:root {
  color-scheme: light;
  --ink: #20273d;
  --muted: #81889b;
  --line: #edf0f5;
  --surface: #fff;
  --page: #f6f8fc;
  --purple: #7164db;
  --purple-dark: #5548c4;
  --mint: #65c9aa;
  --shadow: 0 10px 34px rgba(44, 54, 91, .055);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; font-size: 14px; }
button, textarea, select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 0 0 auto; z-index: 20; width: 252px; padding: 27px 19px 18px; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 7px 38px; text-decoration: none; color: inherit; }
.brand-mark { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg, #8477ec, #6257cf); box-shadow: 0 8px 18px #7164db40; font: 700 21px "Alexandria", sans-serif; }
.brand strong { display: block; font: 700 17px "Alexandria", sans-serif; letter-spacing: -.6px; }
.brand small { display: block; margin-top: 3px; color: #959bad; font-size: 10px; }
.sidebar-label { margin: 0 10px 10px; color: #9ba1b0; font-size: 10px; font-weight: 700; }
.main-nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; height: 43px; border: 0; border-radius: 10px; padding: 0 12px; background: transparent; color: #71788d; text-align: right; cursor: pointer; transition: .18s ease; }
.nav-link:hover { background: #f7f6ff; color: var(--purple); }
.nav-link.active { background: #f0efff; color: var(--purple-dark); font-weight: 700; }
.nav-icon { width: 19px; color: #969cb0; font-size: 19px; text-align: center; }
.nav-link.active .nav-icon { color: var(--purple); }
.subject-label { display: flex; justify-content: space-between; align-items: center; margin-top: 33px; }
.text-button { padding: 4px 6px; border: 0; background: transparent; color: var(--purple); font-size: 11px; cursor: pointer; }
.sidebar-subjects { display: grid; gap: 2px; max-height: 40vh; overflow-y: auto; }
.side-subject { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: right; color: #6f768a; cursor: pointer; }
.side-subject:hover { background: #f7f8fb; }
.side-subject .subject-emoji { font-size: 16px; }
.side-subject span:last-child { font-size: 12px; }
.sidebar-bottom { margin-top: auto; }
.free-note { padding: 14px; border: 1px solid #efedff; border-radius: 12px; background: linear-gradient(130deg,#faf9ff,#fff); }
.free-sparkle { display: inline-grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: #f0efff; color: var(--purple); }
.free-note strong { margin-right: 7px; font-size: 11px; }
.free-note p { margin: 8px 0 0; color: #8e94a5; font-size: 10px; line-height: 1.8; }
.profile { display: flex; align-items: center; gap: 10px; margin: 16px 2px 0; padding-top: 14px; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #fbeedc; color: #b88048; font-weight: 700; }
.profile strong,.profile small { display: block; }
.profile strong { font-size: 10px; }
.profile small { margin-top: 3px; color: #969bad; font-size: 9px; }
.main-area { margin-right: 252px; min-height: 100vh; }
.topbar { height: 69px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; background: rgba(255,255,255,.84); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; gap: 10px; align-items: center; color: #969bad; font-size: 11px; }
.breadcrumb b { color: #c3c7d2; font-weight: 400; }
.breadcrumb strong { color: #454d65; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.today-date { color: #969bad; font-size: 11px; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; color: #777e91; cursor: pointer; }
.icon-button:hover { border-color: #d9d5ff; color: var(--purple); }
.menu-toggle { display: none; }
.content-wrap { max-width: 1260px; margin: 0 auto; padding: 32px 42px 26px; }
.page { display: none; animation: appear .24s ease; }
.page.active { display: block; }
@keyframes appear { from { opacity: .3; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.welcome-row { position: relative; min-height: 198px; overflow: hidden; display: flex; justify-content: space-between; align-items: center; padding: 30px 37px; border: 1px solid #eeedff; border-radius: 17px; background: linear-gradient(105deg,#f4f3ff,#fbfaff 55%,#fff); }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: #8a82da; font-size: 10px; font-weight: 600; }
.live-dot,.status-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #64c8a5; box-shadow: 0 0 0 3px #64c8a51c; }
h1,h2,h3,p { margin-top: 0; }
.welcome-row h1,.page-intro h1 { margin: 13px 0 8px; font: 700 27px "Alexandria","IBM Plex Sans Arabic",sans-serif; letter-spacing: -.8px; }
.welcome-row h1 span,.page-intro h1 span { color: var(--purple); }
.welcome-row p,.page-intro > p { margin: 0; color: #82899c; font-size: 12px; }
.welcome-illustration { position: relative; width: 205px; height: 145px; margin-left: 5%; }
.illustration-sun { position: absolute; top: 13px; right: 43px; width: 111px; height: 111px; border-radius: 50%; background: #e7e4ff; }
.illustration-book { position: absolute; top: 39px; right: 57px; width: 90px; height: 75px; display: grid; place-items: center; border: 4px solid #8276e5; border-bottom-width: 7px; border-radius: 12px 12px 16px 16px; background: #fff; box-shadow: -10px 10px 0 #cbc6ff; color: #9a91eb; font-size: 34px; transform: rotate(-7deg); }
.illustration-star { position: absolute; color: #f1bb73; font-size: 22px; }
.star-one { top: 13px; right: 166px; }.star-two { right: 16px; bottom: 22px; color: #8d81e5; }
.quick-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 18px 0 31px; }
.quick-card { min-height: 83px; display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: right; cursor: pointer; transition: .18s ease; }
.quick-card:hover { border-color: #d8d4ff; transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 12px; font-size: 19px; }
.icon-purple { background: #f0efff; color: #776add; }.icon-mint { background: #eaf8f3; color: #53b796; }.icon-peach { background: #fff4e9; color: #dc9b5d; }
.quick-copy { min-width: 0; flex: 1; }.quick-copy strong,.quick-copy small { display: block; }.quick-copy strong { font-size: 12px; }.quick-copy small { margin-top: 5px; color: #989eae; font-size: 10px; }
.quick-arrow { color: #b2b6c4; font-size: 18px; }
.section-heading,.panel-heading { display: flex; justify-content: space-between; align-items: center; }
.section-heading { margin: 0 1px 13px; }
.section-heading h2 { margin: 4px 0 0; font: 700 17px "Alexandria","IBM Plex Sans Arabic",sans-serif; }
.link-button { border: 0; background: transparent; color: #8278d9; font-size: 10px; cursor: pointer; }
.link-button span,.study-link span { margin-right: 5px; }
.subject-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.subject-card { position: relative; min-height: 106px; padding: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: right; cursor: pointer; transition: .18s ease; }
.subject-card:hover { border-color: #d9d5ff; transform: translateY(-2px); box-shadow: var(--shadow); }
.subject-card .subject-emoji { display: grid; width: 33px; height: 33px; place-items: center; margin-bottom: 9px; border-radius: 10px; background: var(--tone); font-size: 17px; }
.subject-card strong { display: block; font-size: 11px; }
.subject-card small { display: block; margin-top: 4px; color: #999faf; font-size: 9px; }
.lower-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-top: 22px; }
.panel { border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 4px 15px rgba(44,54,91,.025); }
.recent-panel { padding: 17px 19px 14px; }
.panel-heading h3 { margin: 5px 0 0; font-size: 14px; }
.panel-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #f5f4ff; color: var(--purple); }
.recent-list { margin-top: 12px; }
.recent-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #f2f3f7; cursor: pointer; }
.recent-item:hover strong { color: var(--purple); }
.recent-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--tone); }
.recent-item div { flex: 1; }.recent-item strong { display: block; font-size: 10px; font-weight: 600; }.recent-item small { display: block; margin-top: 3px; color: #a0a5b2; font-size: 9px; }
.recent-arrow { color: #b8bdc9; font-size: 14px; }
.study-card { position: relative; overflow: hidden; padding: 21px; border-radius: 13px; color: #fff; background: linear-gradient(140deg,#7568dd,#5d52ca); }
.study-card .eyebrow { color: #d8d3ff; }.study-card h3 { margin: 9px 0 8px; font: 600 17px/1.7 "Alexandria","IBM Plex Sans Arabic",sans-serif; }
.study-card p { max-width: 290px; margin-bottom: 13px; color: #e0ddff; font-size: 10px; line-height: 1.8; }
.study-link { padding: 0; border: 0; background: transparent; color: #fff; font-size: 10px; cursor: pointer; }
.study-decoration { position: absolute; left: 17px; top: 13px; color: #ffffff20; font-size: 85px; }
.site-footer { margin-top: 22px; color: #a3a8b5; text-align: center; font-size: 9px; }
.page-intro { margin: 7px 0 24px; }.page-intro h1 { margin-top: 10px; font-size: 25px; }.page-intro > p { line-height: 1.8; }
.workspace-grid { display: grid; grid-template-columns: minmax(0,1.02fr) minmax(0,.98fr); gap: 17px; align-items: stretch; }
.question-panel { padding: 22px; }.form-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.form-label-row label { font-size: 11px; font-weight: 700; }.form-label-row > span { color: #a2a7b5; font-size: 10px; }
.field-select,.question-input { width: 100%; border: 1px solid #e9ebf2; border-radius: 9px; background: #fcfcfe; color: #42495e; outline: none; }
.field-select { height: 42px; padding: 0 12px; }.field-select:focus,.question-input:focus,.chat-form:focus-within { border-color: #c9c3ff; box-shadow: 0 0 0 3px #7669db12; }
.question-label { margin-top: 19px; }.question-input { min-height: 150px; padding: 12px; resize: vertical; line-height: 1.9; font-size: 12px; }.question-input::placeholder,.chat-form textarea::placeholder { color: #b2b6c1; }
.input-hint { margin: 8px 0 16px; color: #969cac; font-size: 9px; }.input-hint span { color: var(--purple); }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 0 16px; border: 0; border-radius: 9px; background: var(--purple); color: #fff; font-weight: 600; cursor: pointer; transition: .16s ease; }
.primary-button:hover { background: var(--purple-dark); }.primary-button:disabled { opacity: .65; cursor: wait; }.full-button { width: 100%; }.button-arrow { margin-right: auto; font-size: 17px; }
.privacy-hint { margin: 10px 0 0; color: #9da2b1; text-align: center; font-size: 9px; }
.answer-panel { min-height: 410px; padding: 22px; }.answer-placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-art { position: relative; display: grid; width: 75px; height: 75px; place-items: center; margin-bottom: 15px; border-radius: 24px; background: #f3f2ff; color: #8175df; font-size: 31px; transform: rotate(-4deg); }
.empty-art i { position: absolute; top: -7px; right: -6px; color: #e8b96c; font-size: 19px; font-style: normal; }
.answer-placeholder h3 { margin: 0 0 8px; font-size: 13px; }.answer-placeholder > p { margin: 0; color: #979cad; font-size: 10px; }
.example-question { display: flex; align-items: center; gap: 7px; margin-top: 22px; color: #9ba0ae; font-size: 9px; }.example-question button { padding: 7px 9px; border: 1px solid #eeecff; border-radius: 7px; background: #faf9ff; color: #796fd2; font-size: 9px; cursor: pointer; }
.hidden { display: none !important; }
.answer-result h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: #4c45a8; font-size: 13px; }.answer-result h3 span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; background: #f0efff; }
.answer-question { margin: 0 0 16px; padding: 10px 12px; border-right: 3px solid #9b91eb; border-radius: 4px 8px 8px 4px; background: #f8f7ff; color: #646b7d; font-size: 11px; line-height: 1.8; }
.answer-section-title { margin: 15px 0 8px; color: #4b5267; font-size: 11px; font-weight: 700; }
.answer-steps { margin: 0; padding-right: 23px; color: #6f7689; font-size: 11px; line-height: 2; }.answer-steps li { padding-right: 3px; margin-bottom: 4px; }
.final-answer { margin-top: 14px; padding: 11px 13px; border: 1px solid #dff2e9; border-radius: 9px; background: #f3fbf7; color: #3e8d6c; font-size: 12px; font-weight: 700; }
.answer-note { margin: 13px 0 0; color: #989eac; font-size: 9px; line-height: 1.8; }
.disclaimer { display: flex; gap: 9px; align-items: flex-start; margin-top: 15px; padding: 11px 13px; border: 1px solid #f1ebd8; border-radius: 9px; background: #fffdf7; color: #a18447; }.disclaimer > span { font-size: 15px; }.disclaimer p { margin: 0; color: #8d8167; font-size: 10px; line-height: 1.8; }
.chat-shell { display: flex; min-height: 505px; flex-direction: column; overflow: hidden; }
.chat-header { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }.assistant-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: #f0efff; color: var(--purple); font-size: 19px; }
.chat-header strong,.chat-header small { display: block; }.chat-header strong { font-size: 11px; }.chat-header small { margin-top: 4px; color: #9a9faf; font-size: 9px; }.status-dot { width: 5px; height: 5px; margin-left: 4px; }.clear-chat { margin-right: auto; }
.status-dot { background: #b0b5c2; box-shadow: none; }
.status-dot.model-ready { background: #64c8a5; box-shadow: 0 0 0 3px #64c8a51c; }
.chat-messages { flex: 1; min-height: 265px; max-height: 380px; overflow: auto; padding: 20px 20px 10px; }
.message { display: flex; gap: 9px; margin-bottom: 18px; }.message.user-message { flex-direction: row-reverse; }.message-avatar { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 9px; background: #f1efff; color: var(--purple); font-size: 11px; font-weight: 700; }.user-message .message-avatar { background: #edf8f4; color: #50aa8a; }
.message-content { max-width: min(80%,620px); }.message-name { display: block; margin-bottom: 5px; color: #969bac; font-size: 9px; }.message-content p { margin: 0; padding: 10px 12px; border-radius: 4px 11px 11px 11px; background: #f6f6fb; color: #626a7d; font-size: 11px; line-height: 1.9; white-space: pre-wrap; }.user-message .message-content p { border-radius: 11px 4px 11px 11px; background: #efeeff; color: #534c9e; }
.suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 19px 13px; }.suggestions button { padding: 7px 10px; border: 1px solid #efedff; border-radius: 20px; background: #fff; color: #7a72c7; font-size: 9px; cursor: pointer; }.suggestions button:hover { background: #f7f6ff; }
.chat-form { display: flex; align-items: center; gap: 9px; margin: 0 17px; padding: 8px; border: 1px solid #e9ebf2; border-radius: 11px; background: #fff; transition: .15s ease; }.chat-subject { max-width: 128px; height: 33px; padding: 0 7px; border: 0; border-radius: 7px; background: #f7f7fb; color: #767d90; font-size: 9px; outline: none; }.chat-form textarea { min-width: 0; flex: 1; max-height: 90px; padding: 8px 3px; resize: none; border: 0; outline: none; color: #4a5165; font-size: 11px; }.send-button { width: 32px; height: 32px; flex: 0 0 32px; border: 0; border-radius: 9px; background: var(--purple); color: #fff; font-size: 19px; cursor: pointer; }.send-button:hover { background: var(--purple-dark); }
.chat-footnote { padding: 8px 10px 12px; color: #a4a8b5; text-align: center; font-size: 9px; }
.library-layout { display: grid; grid-template-columns: 210px minmax(0,1fr); gap: 15px; align-items: start; }.library-subjects { display: grid; gap: 7px; }.library-subject-button { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-align: right; cursor: pointer; }.library-subject-button.selected { border-color: #d7d2ff; background: #f8f7ff; color: #5e53bd; }.library-subject-button .subject-emoji { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: var(--tone); font-size: 16px; }.library-subject-button strong { font-size: 10px; }
.lesson-panel { min-height: 350px; padding: 20px; }.lesson-panel-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }.lesson-panel-heading h2 { margin: 5px 0 0; font: 600 16px "Alexandria","IBM Plex Sans Arabic",sans-serif; }.lesson-count { color: #9ca1af; font-size: 9px; }
.lesson-item { border-bottom: 1px solid #f0f1f5; }.lesson-item:last-child { border-bottom: 0; }.lesson-toggle { display: flex; width: 100%; align-items: center; gap: 11px; padding: 14px 2px; border: 0; background: transparent; text-align: right; cursor: pointer; }.lesson-number { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; border-radius: 9px; background: var(--tone); color: #665db6; font-size: 10px; }.lesson-title { flex: 1; font-size: 11px; font-weight: 600; }.lesson-chevron { color: #a2a7b4; transition: transform .18s; }.lesson-item.open .lesson-chevron { transform: rotate(180deg); }.lesson-content { display: none; padding: 0 42px 14px; color: #71788b; font-size: 10px; line-height: 1.9; }.lesson-item.open .lesson-content { display: block; }.lesson-content p { margin: 0 0 7px; }.lesson-content strong { color: #50576c; }.lesson-content button { margin-top: 7px; padding: 6px 9px; border: 1px solid #e8e5ff; border-radius: 7px; background: #faf9ff; color: #7269c4; font-size: 9px; cursor: pointer; }
.empty-lessons { padding: 44px 10px; color: #9298a8; text-align: center; font-size: 11px; }
.mobile-backdrop { display: none; }

@media (min-width: 1500px) { .content-wrap { padding-top: 39px; } .welcome-row { min-height: 215px; } }
@media (max-width: 1150px) {
  .sidebar { width: 224px; padding-right: 14px; padding-left: 14px; }
  .main-area { margin-right: 224px; }
  .topbar { padding: 0 28px; }.content-wrap { padding: 27px 28px 22px; }
  .subject-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 850px) {
  .sidebar { width: 245px; transform: translateX(105%); transition: transform .22s ease; box-shadow: -10px 0 35px #25274712; }
  body.menu-open .sidebar { transform: translateX(0); }
  .main-area { margin-right: 0; }.menu-toggle { display: grid; margin-left: auto; }.topbar { justify-content: flex-start; gap: 13px; }.topbar-actions { margin-right: auto; }
  .mobile-backdrop { position: fixed; inset: 0; z-index: 15; background: #24264255; }.menu-open .mobile-backdrop { display: block; }
}
@media (max-width: 650px) {
  .topbar { height: 59px; padding: 0 16px; }.content-wrap { padding: 18px 15px 25px; }.today-date { display: none; }
  .welcome-row { min-height: 165px; padding: 22px 20px; }.welcome-row h1,.page-intro h1 { font-size: 21px; }.welcome-row p { max-width: 250px; font-size: 10px; line-height: 1.8; }.welcome-illustration { position: absolute; left: -52px; bottom: 1px; width: 160px; transform: scale(.72); transform-origin: left bottom; opacity: .8; }
  .quick-grid { grid-template-columns: 1fr; gap: 8px; margin: 12px 0 25px; }.quick-card { min-height: 67px; padding: 10px 12px; }.quick-icon { width: 36px; height: 36px; flex-basis: 36px; }
  .subject-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }.subject-card { min-height: 99px; padding: 11px; }
  .lower-grid { grid-template-columns: 1fr; margin-top: 17px; }.study-card { min-height: 180px; }
  .workspace-grid { grid-template-columns: 1fr; }.answer-panel { min-height: 310px; }.page-intro { margin-bottom: 17px; }
  .library-layout { grid-template-columns: 1fr; }.library-subjects { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }.library-subject-button { min-height: 47px; padding: 7px; gap: 7px; }.library-subject-button strong { font-size: 9px; }.library-subject-button .subject-emoji { width: 27px; height: 27px; flex: 0 0 27px; }
  .lesson-panel { min-height: 270px; padding: 15px; }.chat-shell { min-height: 550px; }.chat-messages { max-height: none; }.chat-form { gap: 5px; margin: 0 9px; }.chat-subject { max-width: 91px; font-size: 8px; }.chat-footnote { font-size: 8px; }.suggestions { padding-right: 10px; padding-left: 10px; }.suggestions button { font-size: 8px; }
}
