/* AI Study Guru Study OS — coherent visual layer (October 2026)
   Loaded last to keep the product UI consistent while retaining all existing hooks. */

body.tutor {
  --os-navy: #10234d;
  --os-ink: #17213b;
  --os-muted: #64708a;
  --os-violet: #5b4fe9;
  --os-indigo: #4038bb;
  --os-mint: #13aa86;
  --os-sky: #eaf4ff;
  --os-surface: #ffffff;
  --os-line: #dfe7f4;
  --os-shadow: 0 18px 48px rgba(28, 48, 95, .12);
  background: #f5f8fc;
  color: var(--os-ink);
}

body.tutor.wt-dark {
  --os-ink: #eaf0ff;
  --os-muted: #adbad5;
  --os-surface: #111d3b;
  --os-line: rgba(216, 229, 255, .14);
  background: #080f23;
}

/* Public sign-in — calm, readable and focused */
body.tutor .wt-main { max-width: 1200px; padding: 28px 22px 64px; }
body.tutor .wt-status {
  max-width: 1156px; margin: 0 auto 16px; border: 1px solid #dce8fa;
  border-radius: 12px; background: #edf5ff; color: #34506f; font-weight: 700;
}
body.tutor .wt-welcome { gap: 24px; margin: 0; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); }
body.tutor .wt-welcome > div:first-child {
  isolation: isolate; min-height: 594px; padding: 46px 42px 34px;
  background:
    radial-gradient(600px 340px at -8% -8%, rgba(87, 184, 255, .33), transparent 60%),
    radial-gradient(520px 330px at 105% 102%, rgba(110, 96, 246, .44), transparent 60%),
    linear-gradient(145deg, #102859 0%, #11234b 54%, #171151 100%) !important;
  border: 1px solid rgba(255,255,255,.22); border-radius: 28px;
  box-shadow: 0 28px 65px rgba(22, 34, 82, .26);
}
body.tutor .wt-welcome > div:first-child::before {
  opacity: .58; background-size: 36px 36px;
  mask-image: linear-gradient(135deg, black, transparent 74%);
}
body.tutor .wt-welcome > div:first-child::after {
  content: "AI"; z-index: -1; right: 29px; top: auto; bottom: 14px;
  font: 900 clamp(8rem, 18vw, 13rem)/.7 var(--pg-font-head); letter-spacing: -.12em;
  color: rgba(255,255,255,.055); animation: none;
}
body.tutor .wt-welcome .wt-eyebrow {
  color: #e8f2ff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2);
  padding: 8px 13px; font-size: .68rem; letter-spacing: .09em;
}
body.tutor .wt-welcome h1,
body.tutor .wt-welcome h1 * {
  color: #fff !important; -webkit-text-fill-color: currentColor !important;
  font-size: clamp(2.35rem, 4.4vw, 4rem) !important; line-height: 1.02 !important;
  letter-spacing: -.045em !important; text-shadow: none;
}
body.tutor .wt-welcome .lead {
  color: #d7e4ff !important; max-width: 37rem; font-size: 1.05rem !important; line-height: 1.7 !important;
}
body.tutor .wt-pills { margin: 26px 0 22px !important; gap: 9px !important; }
body.tutor .wt-pills span {
  color: #f6f9ff !important; background: rgba(255,255,255,.11) !important;
  border-color: rgba(255,255,255,.18) !important; padding: 8px 12px !important;
}
body.tutor .wt-welcome > div:first-child .pg-trust-row { gap: 8px; margin-top: 0; }
body.tutor .pg-trust-chip { background: rgba(5, 16, 48, .27); border-color: rgba(255,255,255,.13); padding: 9px 11px; }
body.tutor .pg-trust-chip small { color: #bbcdf5; }
body.tutor .wt-welcome > div:first-child > p:not(.lead) { color: #b8c8eb !important; max-width: 38rem; line-height: 1.55; }
body.tutor .wt-welcome .wt-small { color: #9fb5df !important; }

body.tutor .wt-welcome .wt-panel {
  align-self: center; padding: 36px 34px !important; border: 1px solid var(--os-line) !important;
  border-radius: 28px !important; background: rgba(255,255,255,.96) !important;
  box-shadow: var(--os-shadow) !important;
}
body.tutor.wt-dark .wt-welcome .wt-panel { background: rgba(17,29,59,.96) !important; }
body.tutor .wt-welcome .wt-panel::before { height: 3px; background: linear-gradient(90deg, #4e8df7, #6654ea, #9e5fda); }
body.tutor .wt-welcome .wt-panel h2 { color: var(--os-ink) !important; font-size: 1.65rem !important; }
body.tutor .wt-welcome .wt-panel p { color: var(--os-muted); line-height: 1.65; }
body.tutor .tutor label, body.tutor .wt-profile label { color: var(--os-ink); }
body.tutor input:not([type=checkbox]):not([type=file]), body.tutor select, body.tutor textarea {
  border: 1.5px solid #d7e1ef !important; border-radius: 12px !important; background: #fbfdff !important;
}
body.tutor input:focus, body.tutor select:focus, body.tutor textarea:focus {
  border-color: #6a5ce9 !important; box-shadow: 0 0 0 4px rgba(91,79,233,.13) !important;
}
body.tutor .btn-primary {
  background: linear-gradient(135deg, #5b4fe9, #3f6ee6) !important; box-shadow: 0 10px 22px rgba(73,75,210,.28) !important;
  border: 0 !important; border-radius: 12px !important;
}
body.tutor .btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* Application shell — a quiet work surface, not a competing dashboard */
body.tutor:has(#workspace:not([hidden])) { background: #f4f7fc; }
.wt-chatgpt-workspace { background: #f4f7fc !important; }
body.tutor.wt-dark .wt-chatgpt-workspace { background: #080f23 !important; }
body.tutor:has(#workspace:not([hidden])) .wt-chatgpt-main { background: transparent !important; }

.wt-chatgpt-sidebar {
  width: 292px !important; background: #10234d !important; border-right: 1px solid rgba(255,255,255,.1) !important;
  box-shadow: 8px 0 32px rgba(16,35,77,.13);
}
body.tutor.wt-dark .wt-chatgpt-sidebar { background: #0b1632 !important; }
.wt-sb-header { padding: 18px 16px 14px !important; }
.wt-sb-logo { background: linear-gradient(135deg, #729cf7, #7362eb) !important; border-radius: 11px; box-shadow: none; }
.wt-sb-title::after { content: "STUDY OS"; background: rgba(255,255,255,.12); box-shadow: none; color: #dbe8ff; }
.wt-new-chat-btn {
  background: #fff !important; color: #293d79 !important; box-shadow: none !important; border: 0 !important;
  border-radius: 12px !important; min-height: 46px !important;
}
.wt-plus-icon { background: #e9edff; color: #4e45cc; box-shadow: none; }
.wt-kbd { background: #edf1fa !important; color: #5c6e91 !important; border: 0 !important; }
.wt-chatgpt-sidebar .wt-action-card { border-radius: 12px !important; padding: 9px 6px !important; }
.wt-chatgpt-sidebar .wt-card-emoji { width: 34px; height: 34px; border-radius: 10px; }
.wt-chatgpt-sidebar .wt-sb-details { border-radius: 12px !important; }
.wt-chatgpt-sidebar .wt-shortcuts button { border-radius: 9px !important; }
.wt-progress-card { border-radius: 13px !important; }

/* Header and controls use information hierarchy, not decorative noise */
.wt-chat-header {
  min-height: 66px; background: rgba(255,255,255,.92) !important; border: 0 !important;
  border-bottom: 1px solid var(--os-line) !important; box-shadow: none !important; padding: 10px 20px !important;
}
body.tutor.wt-dark .wt-chat-header { background: rgba(8,15,35,.94) !important; }
.wt-model-badge { background: #eef2ff !important; border: 1px solid #dce4fa !important; box-shadow: none !important; }
.wt-model-badge .wt-model-name { color: #28345e !important; }
.wt-model-badge .wt-model-icon { background: #5b4fe9 !important; }
.wt-student-profile-pill, .wt-header-action-btn { box-shadow: none !important; border-color: #dce4f0 !important; }
.wt-hub-btn { background: #eff2ff !important; color: #4941c5 !important; box-shadow: none !important; }
.wt-dark-toggle { background: #eff2ff !important; color: #3f5195 !important; box-shadow: none; }
.wt-quick-new-btn { box-shadow: none !important; padding: 9px 14px !important; }
.wt-tip-banner {
  margin: 12px 18px 0 !important; background: #eff7ff !important; border: 1px solid #d8e9fc !important;
  box-shadow: none !important; border-radius: 12px !important;
}
.wt-tip-text { color: #355778 !important; }
.wt-quest-strip { display: none !important; }
.wt-study-controls { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 12px 18px 8px !important; }
.wt-mode-pill { border-radius: 10px !important; box-shadow: none !important; }
.wt-mode-pill.active { background: #5b4fe9 !important; box-shadow: 0 7px 14px rgba(91,79,233,.22) !important; }
.wt-subj-chip { border-radius: 999px !important; box-shadow: none !important; }
.wt-chapter-bar { background: #fff !important; border-color: #e0e8f4 !important; border-radius: 11px !important; }

/* Conversation gets generous reading space and a focused start state */
.wt-chatgpt-messages { max-width: 820px; padding: 22px 18px 178px !important; background-image: none !important; }
body.tutor .wt-chatgpt-welcome {
  background: #fff !important; border: 1px solid #dfe7f4 !important; border-radius: 20px !important;
  box-shadow: var(--os-shadow) !important; padding: 32px 28px !important;
}
body.tutor .wt-chatgpt-welcome::before { height: 4px; background: linear-gradient(90deg, #5b4fe9, #41a2ef) !important; }
body.tutor .wt-welcome-teacher-avatar { background: linear-gradient(135deg, #5b4fe9, #41a2ef) !important; box-shadow: 0 14px 28px rgba(80,80,210,.28) !important; }
body.tutor .wt-chatgpt-welcome h2, body.tutor .wt-prompt-title { color: var(--os-ink) !important; }
body.tutor .wt-prompt-card { border-color: #e0e7f2 !important; border-radius: 14px !important; box-shadow: none !important; }
body.tutor .wt-prompt-card:hover { border-color: #8e85f4 !important; box-shadow: 0 8px 20px rgba(45,65,112,.1) !important; transform: translateY(-2px); }
.wt-message { gap: 11px !important; margin: 16px 0 !important; }
.wt-msg-avatar { width: 38px !important; height: 38px !important; border-radius: 11px !important; box-shadow: none !important; }
.wt-msg-content { border: 1px solid #e0e7f2 !important; border-radius: 8px 16px 16px 16px !important; box-shadow: 0 3px 12px rgba(39,55,93,.05) !important; }
body.tutor .wt-message:not(.user) .wt-msg-content::before { height: 3px; background: #80b5f1; }
.wt-message.user .wt-msg-content { background: #5b4fe9 !important; box-shadow: none !important; border-radius: 16px 8px 16px 16px !important; }
.wt-msg-author { background: #edf2ff !important; color: #4c46bb !important; }

/* Composer remains prominent but reduces visual clutter */
.wt-composer-wrapper { background: linear-gradient(to top, #f4f7fc 62%, rgba(244,247,252,0)) !important; padding: 12px 18px 13px !important; }
body.tutor.wt-dark .wt-composer-wrapper { background: linear-gradient(to top, #080f23 62%, rgba(8,15,35,0)) !important; }
.wt-accelerator-strip { padding: 6px 2px 8px !important; }
.wt-accel-chip { box-shadow: none !important; border-radius: 999px !important; background: #fff !important; color: #475979 !important; }
.wt-accel-chip:hover { background: #edf0ff !important; border-color: #b8b1ff !important; color: #433cc4 !important; transform: none; }
.wt-compose-capsule {
  border: 1.5px solid #d8e2ef !important; border-radius: 18px !important; padding: 8px 9px !important;
  background: #fff !important; box-shadow: 0 14px 34px rgba(31,51,99,.12) !important;
}
.wt-compose-capsule:focus-within { border-color: #7368ee !important; box-shadow: 0 0 0 4px rgba(91,79,233,.12), 0 14px 34px rgba(31,51,99,.12) !important; }
.wt-send-btn { width: 42px !important; height: 42px !important; background: #5b4fe9 !important; box-shadow: none !important; }
.wt-tool-btn, .wt-upload-btn, .wt-voice-btn { width: 38px !important; height: 38px !important; background: #f0f4fb !important; color: #4a5d88 !important; border-color: #e0e7f2 !important; }

@media (max-width: 1024px) {
  body.tutor .wt-welcome { grid-template-columns: 1fr; }
  body.tutor .wt-welcome > div:first-child { min-height: 0; }
  body.tutor .wt-welcome .wt-panel { max-width: 680px; width: 100%; margin: 0 auto; }
}
@media (max-width: 700px) {
  body.tutor .wt-main { padding: 16px 12px 44px; }
  body.tutor .wt-welcome > div:first-child { padding: 29px 22px 26px; border-radius: 21px; }
  body.tutor .wt-welcome h1, body.tutor .wt-welcome h1 * { font-size: clamp(2.1rem, 10vw, 3.2rem) !important; }
  body.tutor .wt-welcome .wt-panel { padding: 28px 22px !important; border-radius: 21px !important; }
  .wt-quest-strip { display: none !important; }
  .wt-tip-banner { margin: 8px 12px 0 !important; }
  .wt-study-controls { padding: 9px 12px 6px !important; }
  .wt-chatgpt-messages { padding: 14px 12px 166px !important; }
  .wt-composer-wrapper { padding: 10px 12px !important; }
}

/* Workspace refinement — post-login screen: one task at a time. */
body.tutor.wt-in-workspace .wt-status { display: none !important; }
body.tutor.wt-in-workspace .wt-chat-area { min-width: 0; position: relative; }
body.tutor.wt-in-workspace .wt-chat-header { height: 64px !important; min-height: 64px !important; max-height: none !important; flex: 0 0 64px; gap: 12px; overflow: visible; }
body.tutor.wt-in-workspace .wt-chat-header-left, body.tutor.wt-in-workspace .wt-chat-header-right { min-width: 0; gap: 8px !important; }
body.tutor.wt-in-workspace .wt-chat-header-right { margin-left: auto; }
body.tutor.wt-in-workspace .wt-model-badge { min-width: 0; }
body.tutor.wt-in-workspace .wt-student-profile-pill { max-width: 165px; overflow: hidden; }
body.tutor.wt-in-workspace .wt-prof-board { overflow: hidden; text-overflow: ellipsis; }
body.tutor.wt-in-workspace #header-timer-display { display: none; }
body.tutor.wt-in-workspace .wt-timer-trigger { width: 40px; min-width: 40px; padding: 0 !important; justify-content: center; }
body.tutor.wt-in-workspace .wt-study-hub-dropdown { z-index: 1000; }

/* The old tip, quest and 21 quick prompts competed with the study task. */
body.tutor.wt-in-workspace #tip-banner, body.tutor.wt-in-workspace #quest-strip, body.tutor.wt-in-workspace #chapter-bar, body.tutor.wt-in-workspace #study-accelerator-bar { display: none !important; }
body.tutor.wt-in-workspace #study-controls { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 9px; margin: 0 !important; padding: 12px 20px !important; background: rgba(255,255,255,.78) !important; border-bottom: 1px solid #e3eaf5 !important; box-shadow: none !important; overflow: visible !important; }
body.tutor.wt-dark.wt-in-workspace #study-controls { background: rgba(8,15,35,.76) !important; border-color: rgba(255,255,255,.09) !important; }
body.tutor.wt-in-workspace .wt-teacher-modes-bar, body.tutor.wt-in-workspace .wt-subjects-bar { display: flex !important; visibility: visible !important; height: auto !important; margin: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; overflow-x: auto; }
body.tutor.wt-in-workspace .wt-mode-pill { padding: 8px 13px !important; font-size: .78rem !important; }
body.tutor.wt-in-workspace .wt-subjects-bar { gap: 7px !important; }
body.tutor.wt-in-workspace .wt-subj-caption { margin-right: 2px; }
body.tutor.wt-in-workspace .wt-subj-chip { padding: 6px 11px !important; font-size: .75rem !important; }

body.tutor.wt-in-workspace .wt-chatgpt-messages { width: 100%; max-width: none; padding: 30px clamp(18px, 4vw, 58px) 160px !important; background: #f7f9fd !important; }
body.tutor.wt-dark.wt-in-workspace .wt-chatgpt-messages { background: #080f23 !important; }
body.tutor.wt-in-workspace .wt-chatgpt-messages > * { max-width: 920px !important; }
body.tutor.wt-in-workspace .wt-message { max-width: 920px !important; }
body.tutor.wt-in-workspace .wt-message:not(.user) .wt-msg-content { max-width: min(760px, 90%); }
body.tutor.wt-in-workspace .wt-message.user .wt-msg-content { max-width: min(660px, 88%); }
body.tutor.wt-in-workspace .wt-msg-content { padding: 17px 19px !important; line-height: 1.72 !important; }

/* New empty state turns the large blank canvas into a short, useful start. */
body.tutor.wt-in-workspace .wt-chatgpt-welcome { max-width: 760px !important; margin: clamp(8px, 6vh, 52px) auto 0 !important; padding: 34px !important; align-items: flex-start !important; text-align: left !important; background: linear-gradient(145deg, #fff 0%, #f8faff 100%) !important; }
body.tutor.wt-in-workspace .wt-desk-kicker { display: inline-flex; align-items: center; gap: 8px; color: #506487; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
body.tutor.wt-in-workspace .wt-desk-status { width: 8px; height: 8px; border-radius: 999px; background: #21b58c; box-shadow: 0 0 0 4px #dff7ef; }
body.tutor.wt-in-workspace .wt-welcome-teacher-avatar { margin: 20px 0 14px !important; width: 58px !important; height: 58px !important; font-size: 1.8rem !important; border-radius: 18px !important; animation: none !important; }
body.tutor.wt-in-workspace .wt-chatgpt-welcome h2 { margin: 0 0 8px !important; font-size: clamp(1.65rem, 3.5vw, 2.15rem) !important; }
body.tutor.wt-in-workspace .wt-welcome-mode-badge { margin: 0 0 12px !important; }
body.tutor.wt-in-workspace .wt-chatgpt-welcome > p:not(.wt-desk-note) { color: #566582 !important; max-width: 620px; margin: 0 !important; }
body.tutor.wt-in-workspace .wt-chatgpt-prompts { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; margin-top: 24px !important; }
body.tutor.wt-in-workspace .wt-prompt-card { min-height: 118px; padding: 15px !important; }
body.tutor.wt-in-workspace .wt-prompt-icon { width: 36px !important; height: 36px !important; }
body.tutor.wt-in-workspace .wt-desk-note { margin: 18px 0 0 !important; color: #74829d !important; font-size: .8rem !important; }

body.tutor.wt-in-workspace .wt-composer-wrapper { padding: 10px clamp(14px, 4vw, 48px) 12px !important; }
body.tutor.wt-in-workspace .wt-chatgpt-composer { max-width: 920px !important; }
body.tutor.wt-in-workspace .wt-compose-capsule { border-radius: 16px !important; }

@media (max-width: 760px) {
  body.tutor.wt-in-workspace .wt-chat-header { height: 58px !important; min-height: 58px !important; flex-basis: 58px; padding: 8px 12px !important; }
  body.tutor.wt-in-workspace .wt-model-name, body.tutor.wt-in-workspace .wt-student-profile-pill, body.tutor.wt-in-workspace .wt-hub-label, body.tutor.wt-in-workspace .wt-hub-chevron { display: none !important; }
  body.tutor.wt-in-workspace .wt-model-badge { padding: 5px !important; }
  body.tutor.wt-in-workspace .wt-hub-btn { width: 40px; min-width: 40px; padding: 0 !important; justify-content: center; }
  body.tutor.wt-in-workspace .wt-quick-new-btn { padding: 8px 10px !important; font-size: .72rem !important; white-space: nowrap; }
  body.tutor.wt-in-workspace #study-controls { padding: 9px 12px !important; }
  body.tutor.wt-in-workspace .wt-mode-pill { padding: 7px 10px !important; }
  body.tutor.wt-in-workspace .wt-mode-label { font-size: .72rem; }
  body.tutor.wt-in-workspace .wt-chatgpt-messages { padding: 18px 12px 150px !important; }
  body.tutor.wt-in-workspace .wt-chatgpt-welcome { padding: 26px 20px !important; margin-top: 10px !important; }
  body.tutor.wt-in-workspace .wt-chatgpt-prompts { grid-template-columns: 1fr !important; }
  body.tutor.wt-in-workspace .wt-prompt-card { min-height: 88px; }
}
