/* ============================================================

   GATE ML Study Companion — High-End Interactive Study Suite

   Highlights, Notes, Flashcards, Formula Drawer, Pomodoro,

   Reading Progress & Zen Reading Mode.

   ============================================================ */



/* ---------- Reading Progress Bar (Top) ---------- */

#studyProgressBar {

  position: fixed;

  top: 0;

  left: 0;

  height: 3.5px;

  width: 0%;

  background: linear-gradient(90deg, #e2601f, #f59e0b, #10b981);

  z-index: 9999;

  pointer-events: none;

  transition: width 0.12s ease-out;

  box-shadow: 0 0 10px rgba(226, 96, 31, 0.5);

}



/* ---------- Highlights in Document ---------- */

.study-hl {

  border-radius: 3px;

  padding: 1px 2px;

  cursor: pointer;

  transition: filter 0.15s ease, box-shadow 0.15s ease;

  position: relative;

}

.study-hl:hover {

  filter: brightness(0.94);

  box-shadow: 0 0 0 2px rgba(226, 96, 31, 0.35);

}

.study-hl--yellow {

  background: #fef08a !important;

  color: #854d0e !important;

  border-bottom: 2px solid #eab308;

}

.study-hl--green {

  background: #bbf7d0 !important;

  color: #166534 !important;

  border-bottom: 2px solid #22c55e;

}

.study-hl--purple {

  background: #e9d5ff !important;

  color: #6b21a8 !important;

  border-bottom: 2px solid #a855f7;

}

.study-hl--coral {

  background: #fecdd3 !important;

  color: #9f1239 !important;

  border-bottom: 2px solid #f43f5e;

}



/* Pulse animation for jumped highlight */

@keyframes studyHlPulse {

  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(226, 96, 31, 0.7); }

  50% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(226, 96, 31, 0); }

  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(226, 96, 31, 0); }

}

.study-hl--pulse {

  animation: studyHlPulse 1.2s cubic-bezier(0.25, 1, 0.5, 1);

  outline: 2px solid #e2601f;

}



/* ---------- Floating Selection Toolbar (Tooltip) ---------- */

.study-selection-bar {

  position: fixed;

  z-index: 999;

  display: flex;

  align-items: center;

  gap: 6px;

  padding: 6px 10px;

  background: #111111;

  color: #f5f3ee;

  border: 1px solid rgba(255, 255, 255, 0.18);

  border-radius: 999px;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);

  transform: translate(-50%, -100%) scale(0.95);

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);

  font-family: var(--font-sans, "Manrope", sans-serif);

  backdrop-filter: blur(12px);

  -webkit-backdrop-filter: blur(12px);

}

.study-selection-bar.active {

  opacity: 1;

  pointer-events: auto;

  transform: translate(-50%, calc(-100% - 10px)) scale(1);

}

.study-selection-bar__colors {

  display: flex;

  align-items: center;

  gap: 5px;

  padding-right: 6px;

  border-right: 1px solid rgba(255, 255, 255, 0.16);

}

.study-color-btn {

  width: 22px;

  height: 22px;

  border-radius: 50%;

  border: 2px solid transparent;

  cursor: pointer;

  transition: transform 0.15s ease, border-color 0.15s ease;

  padding: 0;

  outline: none;

}

.study-color-btn:hover {

  transform: scale(1.22);

}

.study-color-btn:focus-visible {

  border-color: #fff;

}

.study-color-btn--yellow { background: #fef08a; }

.study-color-btn--green { background: #86efac; }

.study-color-btn--purple { background: #d8b4fe; }

.study-color-btn--coral { background: #fda4af; }



.study-sel-action-btn {

  background: transparent;

  border: none;

  color: #e5e5e5;

  font-size: 11.5px;

  font-weight: 600;

  padding: 5px 9px;

  border-radius: 999px;

  cursor: pointer;

  display: inline-flex;

  align-items: center;

  gap: 4px;

  transition: background 0.15s ease, color 0.15s ease;

  font-family: inherit;

}

.study-sel-action-btn:hover {

  background: rgba(255, 255, 255, 0.14);

  color: #ffffff;

}



/* ---------- Highlight Context Popover ---------- */

.study-hl-popover {

  position: fixed;

  z-index: 1000;

  background: #111111;

  color: #f5f3ee;

  border: 1px solid rgba(255, 255, 255, 0.18);

  border-radius: 12px;

  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);

  padding: 14px;

  width: min(320px, 90vw);

  transform: translate(-50%, 8px);

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.18s ease, transform 0.18s ease;

  font-family: var(--font-sans, "Manrope", sans-serif);

}

.study-hl-popover.active {

  opacity: 1;

  pointer-events: auto;

  transform: translate(-50%, 0);

}

.study-hl-popover__head {

  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 10px;

  font-size: 11px;

  color: #9ca3af;

  font-family: var(--font-mono, monospace);

  text-transform: uppercase;

  letter-spacing: 0.08em;

}

.study-hl-popover textarea {

  width: 100%;

  box-sizing: border-box;

  background: rgba(255, 255, 255, 0.07);

  border: 1px solid rgba(255, 255, 255, 0.15);

  border-radius: 6px;

  padding: 8px 10px;

  color: #f5f3ee;

  font-family: var(--font-sans, "Manrope", sans-serif);

  font-size: 12.5px;

  line-height: 1.5;

  resize: vertical;

  min-height: 60px;

}

.study-hl-popover textarea:focus {

  outline: none;

  border-color: #e2601f;

  background: rgba(255, 255, 255, 0.1);

}

.study-hl-popover__actions {

  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-top: 10px;

  gap: 8px;

}

.study-hl-popover__btn {

  background: rgba(255, 255, 255, 0.09);

  color: #f5f3ee;

  border: 1px solid rgba(255, 255, 255, 0.14);

  border-radius: 6px;

  padding: 5px 10px;

  font-size: 11.5px;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.15s ease;

}

.study-hl-popover__btn:hover {

  background: rgba(255, 255, 255, 0.18);

}

.study-hl-popover__btn--delete {

  color: #f87171;

  border-color: rgba(248, 113, 113, 0.3);

}

.study-hl-popover__btn--delete:hover {

  background: rgba(239, 68, 68, 0.2);

  color: #fca5a5;

}

.study-hl-popover__btn--primary {

  background: #e2601f;

  border-color: #e2601f;

  color: #ffffff;

}

.study-hl-popover__btn--primary:hover {

  background: #f07029;

}



/* ---------- Floating Study Dock (Bottom-Right) ---------- */

.study-dock {

  position: fixed;

  right: 24px;

  bottom: 24px;

  z-index: 95;

  display: flex;

  align-items: center;

  gap: 8px;

  background: rgba(14, 14, 14, 0.92);

  border: 1px solid rgba(255, 255, 255, 0.18);

  border-radius: 999px;

  padding: 6px 8px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);

  backdrop-filter: blur(14px);

  -webkit-backdrop-filter: blur(14px);

  font-family: var(--font-sans, "Manrope", sans-serif);

  transition: transform 0.22s ease, box-shadow 0.22s ease;

}

.study-dock:hover {

  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);

  border-color: rgba(226, 96, 31, 0.5);

}

.study-dock__btn {

  display: inline-flex;

  align-items: center;

  gap: 6px;

  background: transparent;

  color: #f5f3ee;

  border: none;

  border-radius: 999px;

  padding: 8px 14px;

  font-size: 12px;

  font-weight: 700;

  letter-spacing: 0.02em;

  cursor: pointer;

  transition: all 0.16s ease;

  position: relative;

  font-family: inherit;

}

.study-dock__btn:hover {

  background: rgba(255, 255, 255, 0.12);

  color: #ffffff;

}

.study-dock__btn--primary {

  background: #e2601f;

  color: #ffffff;

}

.study-dock__btn--primary:hover {

  background: #f07029;

}

.study-dock__badge {

  background: rgba(255, 255, 255, 0.24);

  font-size: 10px;

  font-weight: 800;

  padding: 1px 6px;

  border-radius: 999px;

  margin-left: 2px;

}

.study-dock__timer-badge {

  font-family: var(--font-mono, monospace);

  font-size: 11px;

  background: rgba(16, 185, 129, 0.2);

  color: #34d399;

  border: 1px solid rgba(16, 185, 129, 0.4);

  padding: 2px 7px;

  border-radius: 999px;

  display: inline-flex;

  align-items: center;

  gap: 4px;

}

.study-dock__timer-badge.running {

  animation: pulseTimer 1.5s infinite;

}

@keyframes pulseTimer {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.study-dock__btn--min {
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1;
  color: rgba(245, 243, 238, 0.65);
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.16s ease;
}
.study-dock__btn--min:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.study-dock.study-dock--minimized {
  padding: 4px 6px;
  background: rgba(14, 14, 14, 0.95);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
.study-dock.study-dock--minimized .study-dock__btn:not(.study-dock__btn--min):not(#studyDockHubBtn) {
  display: none;
}
.study-dock.study-dock--minimized #studyDockHubBtn {
  padding: 6px 10px;
  font-size: 11px;
}




/* ---------- Study Drawer (Slide-Over Panel) ---------- */

.study-backdrop {

  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.55);

  backdrop-filter: blur(4px);

  -webkit-backdrop-filter: blur(4px);

  z-index: 100;

  opacity: 0;

  visibility: hidden;

  transition: opacity 0.25s ease, visibility 0.25s ease;

}

.study-backdrop.active {

  opacity: 1;

  visibility: visible;

}



.study-drawer {

  position: fixed;

  top: 0;

  right: 0;

  bottom: 0;

  width: min(520px, 100vw);

  background: #121212;

  color: #f5f3ee;

  border-left: 1px solid rgba(255, 255, 255, 0.12);

  z-index: 101;

  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.5);

  display: flex;

  flex-direction: column;

  transform: translateX(100%);

  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  font-family: var(--font-sans, "Manrope", sans-serif);

}

.study-drawer.open {

  transform: translateX(0);

}



/* Drawer Header */

.study-drawer__head {

  padding: 16px 20px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  background: #171717;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;

}

.study-drawer__title {

  display: flex;

  align-items: center;

  gap: 10px;

}

.study-drawer__title h3 {

  margin: 0;

  font-size: 16px;

  font-weight: 800;

  letter-spacing: -0.02em;

  color: #ffffff;

}

.study-drawer__title span {

  font-family: var(--font-mono, monospace);

  font-size: 11px;

  color: #e2601f;

  background: rgba(226, 96, 31, 0.15);

  border: 1px solid rgba(226, 96, 31, 0.3);

  padding: 2px 7px;

  border-radius: 999px;

  font-weight: 600;

}

.study-drawer__close {

  background: rgba(255, 255, 255, 0.08);

  border: none;

  color: #9ca3af;

  width: 32px;

  height: 32px;

  border-radius: 50%;

  cursor: pointer;

  display: flex;

  align-items: center;

  justify-content: center;

  font-size: 18px;

  transition: all 0.15s ease;

}

.study-drawer__close:hover {

  background: rgba(255, 255, 255, 0.18);

  color: #ffffff;

}



/* Drawer Tab Navigation */

.study-drawer__tabs {

  display: flex;

  overflow-x: auto;

  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  background: #141414;

  padding: 4px 10px 0;

  gap: 4px;

  scrollbar-width: none;

}

.study-drawer__tabs::-webkit-scrollbar {

  display: none;

}

.study-tab-btn {

  background: transparent;

  border: none;

  border-bottom: 2px solid transparent;

  color: #9ca3af;

  padding: 10px 14px;

  font-size: 12.5px;

  font-weight: 600;

  cursor: pointer;

  display: inline-flex;

  align-items: center;

  gap: 6px;

  white-space: nowrap;

  transition: all 0.16s ease;

  font-family: inherit;

}

.study-tab-btn:hover {

  color: #f5f3ee;

  background: rgba(255, 255, 255, 0.04);

}

.study-tab-btn.active {

  color: #e2601f;

  border-bottom-color: #e2601f;

  background: rgba(226, 96, 31, 0.08);

}

.study-tab-btn .badge {

  background: rgba(255, 255, 255, 0.14);

  font-size: 10px;

  font-family: var(--font-mono, monospace);

  padding: 1px 5px;

  border-radius: 999px;

  color: inherit;

}



/* Drawer Body Content */

.study-drawer__body {

  flex: 1;

  overflow-y: auto;

  padding: 20px;

  display: flex;

  flex-direction: column;

  gap: 18px;

  scrollbar-width: thin;

  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;

}

.study-drawer__body::-webkit-scrollbar {

  width: 6px;

}

.study-drawer__body::-webkit-scrollbar-thumb {

  background: rgba(255, 255, 255, 0.18);

  border-radius: 3px;

}



/* Tab Panels */

.study-panel {

  display: none;

  flex-direction: column;

  gap: 16px;

}

.study-panel.active {

  display: flex;

}



/* ---------- TAB 1: NOTES ---------- */

.study-notes-toolbar {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 10px;

  flex-wrap: wrap;

}

.study-select {

  background: #1e1e1e;

  border: 1px solid rgba(255, 255, 255, 0.16);

  border-radius: 6px;

  color: #f5f3ee;

  padding: 7px 12px;

  font-size: 12px;

  font-family: inherit;

  outline: none;

  cursor: pointer;

}

.study-select:focus {

  border-color: #e2601f;

}

.study-btn-row {

  display: flex;

  gap: 6px;

}

.study-btn {

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.16);

  color: #f5f3ee;

  border-radius: 6px;

  padding: 6px 12px;

  font-size: 11.5px;

  font-weight: 600;

  cursor: pointer;

  display: inline-flex;

  align-items: center;

  gap: 5px;

  transition: all 0.15s ease;

  font-family: inherit;

}

.study-btn:hover {

  background: rgba(255, 255, 255, 0.15);

  border-color: rgba(255, 255, 255, 0.3);

}

.study-btn--accent {

  background: #e2601f;

  border-color: #e2601f;

  color: #fff;

}

.study-btn--accent:hover {

  background: #f07029;

}



.study-textarea-wrapper {

  display: flex;

  flex-direction: column;

  gap: 8px;

}

.study-textarea {

  width: 100%;

  box-sizing: border-box;

  background: #181818;

  border: 1px solid rgba(255, 255, 255, 0.15);

  border-radius: 8px;

  padding: 12px 14px;

  color: #f5f3ee;

  font-family: var(--font-sans, "Manrope", sans-serif);

  font-size: 13.5px;

  line-height: 1.6;

  resize: vertical;

  min-height: 160px;

}

.study-textarea:focus {

  outline: none;

  border-color: #e2601f;

  background: #1c1c1c;

}

.study-notes-footer {

  display: flex;

  align-items: center;

  justify-content: space-between;

  font-size: 11px;

  color: #9ca3af;

  font-family: var(--font-mono, monospace);

}



/* List of Annotations / Excerpt Notes */

.study-annotations-heading {

  margin: 10px 0 6px;

  font-size: 12.5px;

  font-weight: 700;

  letter-spacing: 0.05em;

  text-transform: uppercase;

  color: #9ca3af;

  font-family: var(--font-mono, monospace);

  display: flex;

  align-items: center;

  justify-content: space-between;

}

.study-card-list {

  display: flex;

  flex-direction: column;

  gap: 12px;

}

.study-note-card {

  background: #1a1a1a;

  border: 1px solid rgba(255, 255, 255, 0.1);

  border-left: 4px solid #e2601f;

  border-radius: 8px;

  padding: 12px 14px;

  display: flex;

  flex-direction: column;

  gap: 8px;

  transition: border-color 0.15s ease, background 0.15s ease;

}

.study-note-card:hover {

  background: #202020;

  border-color: rgba(255, 255, 255, 0.2);

}

.study-note-card--yellow { border-left-color: #eab308; }

.study-note-card--green { border-left-color: #22c55e; }

.study-note-card--purple { border-left-color: #a855f7; }

.study-note-card--coral { border-left-color: #f43f5e; }



.study-note-card__meta {

  display: flex;

  align-items: center;

  justify-content: space-between;

  font-size: 11px;

  color: #9ca3af;

  font-family: var(--font-mono, monospace);

}

.study-note-card__quote {

  font-size: 12px;

  font-style: italic;

  color: rgba(245, 243, 238, 0.75);

  background: rgba(255, 255, 255, 0.04);

  padding: 6px 10px;

  border-radius: 5px;

  margin: 0;

  line-height: 1.45;

  border-left: 2px solid rgba(255, 255, 255, 0.2);

}

.study-note-card__text {

  font-size: 13px;

  line-height: 1.5;

  color: #f5f3ee;

  margin: 0;

}

.study-note-card__actions {

  display: flex;

  align-items: center;

  gap: 8px;

  margin-top: 2px;

}

.study-action-link {

  background: none;

  border: none;

  color: #e2601f;

  font-size: 11.5px;

  font-weight: 600;

  cursor: pointer;

  padding: 0;

  text-decoration: underline;

  text-underline-offset: 3px;

}

.study-action-link:hover {

  color: #f07029;

}

.study-action-link--danger {

  color: #f87171;

}

.study-action-link--danger:hover {

  color: #fca5a5;

}



.study-empty-state {

  text-align: center;

  padding: 30px 20px;

  color: #9ca3af;

  font-size: 13px;

  border: 1px dashed rgba(255, 255, 255, 0.15);

  border-radius: 8px;

}



/* ---------- TAB 2: HIGHLIGHTS ---------- */

.study-filter-bar {

  display: flex;

  gap: 6px;

  flex-wrap: wrap;

}

.study-filter-pill {

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.15);

  color: #9ca3af;

  font-size: 11px;

  font-weight: 600;

  padding: 5px 10px;

  border-radius: 999px;

  cursor: pointer;

  transition: all 0.15s ease;

}

.study-filter-pill:hover, .study-filter-pill.active {

  background: #ffffff;

  color: #111111;

  border-color: #ffffff;

}



/* ---------- TAB 3: FLASHCARDS (ACTIVE RECALL) ---------- */

.study-flashcard-wrap {

  display: flex;

  flex-direction: column;

  gap: 14px;

}

.study-flashcard-header {

  display: flex;

  align-items: center;

  justify-content: space-between;

}

.study-flashcard-header select {

  max-width: 220px;

}



.study-flashcard {

  perspective: 1000px;

  min-height: 240px;

  cursor: pointer;

}

.study-flashcard__inner {

  position: relative;

  width: 100%;

  min-height: 240px;

  text-align: center;

  transition: transform 0.5s cubic-bezier(0.4, 0.2, 0.2, 1);

  transform-style: preserve-3d;

  border-radius: 12px;

}

.study-flashcard.flipped .study-flashcard__inner {

  transform: rotateY(180deg);

}

.study-flashcard__face {

  position: absolute;

  inset: 0;

  backface-visibility: hidden;

  -webkit-backface-visibility: hidden;

  border-radius: 12px;

  padding: 24px;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  border: 1px solid rgba(255, 255, 255, 0.16);

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);

  box-sizing: border-box;

}

.study-flashcard__front {

  background: linear-gradient(145deg, #1f1f1f, #151515);

  color: #ffffff;

}

.study-flashcard__back {

  background: linear-gradient(145deg, #1b261e, #131b15);

  color: #f5f3ee;

  transform: rotateY(180deg);

  border-color: rgba(52, 211, 153, 0.3);

}

.study-flashcard__unit-tag {

  font-family: var(--font-mono, monospace);

  font-size: 11px;

  text-transform: uppercase;

  color: #e2601f;

  margin-bottom: 12px;

  letter-spacing: 0.1em;

}

.study-flashcard__prompt {

  font-size: 16px;

  font-weight: 700;

  line-height: 1.4;

  margin: 0 0 12px;

}

.study-flashcard__hint {

  font-size: 11.5px;

  color: #9ca3af;

  margin-top: auto;

  font-family: var(--font-mono, monospace);

}

.study-flashcard__ans-title {

  font-size: 12px;

  text-transform: uppercase;

  letter-spacing: 0.1em;

  color: #34d399;

  margin-bottom: 8px;

  font-family: var(--font-mono, monospace);

}

.study-flashcard__ans-body {

  font-size: 14px;

  line-height: 1.6;

  margin: 0;

  text-align: left;

}

.study-flashcard__code {

  font-family: var(--font-mono, monospace);

  background: rgba(0, 0, 0, 0.4);

  padding: 4px 8px;

  border-radius: 4px;

  font-size: 12.5px;

  color: #6ee7b7;

  display: block;

  margin-top: 8px;

  text-align: center;

}



.study-flashcard-controls {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 8px;

}

.study-flashcard-rating {

  display: flex;

  gap: 8px;

  justify-content: center;

  margin-top: 4px;

}

.study-rate-btn {

  flex: 1;

  padding: 8px 12px;

  border-radius: 6px;

  font-size: 12px;

  font-weight: 700;

  border: 1px solid transparent;

  cursor: pointer;

  transition: transform 0.15s ease, background 0.15s ease;

  font-family: inherit;

}

.study-rate-btn:hover {

  transform: translateY(-1px);

}

.study-rate-btn--again {

  background: rgba(239, 68, 68, 0.15);

  border-color: rgba(239, 68, 68, 0.35);

  color: #f87171;

}

.study-rate-btn--mastered {

  background: rgba(16, 185, 129, 0.18);

  border-color: rgba(16, 185, 129, 0.4);

  color: #34d399;

}



/* ---------- TAB 4: FORMULA CHEAT SHEET ---------- */

.study-search-input {

  width: 100%;

  box-sizing: border-box;

  background: #181818;

  border: 1px solid rgba(255, 255, 255, 0.15);

  border-radius: 6px;

  padding: 8px 12px;

  color: #f5f3ee;

  font-size: 13px;

  font-family: inherit;

  outline: none;

}

.study-search-input:focus {

  border-color: #e2601f;

  background: #1d1d1d;

}

.study-formula-grid {

  display: flex;

  flex-direction: column;

  gap: 12px;

}

.study-formula-card {

  background: #181818;

  border: 1px solid rgba(255, 255, 255, 0.1);

  border-radius: 8px;

  padding: 12px 14px;

  transition: all 0.16s ease;

}

.study-formula-card:hover {

  border-color: rgba(226, 96, 31, 0.4);

  background: #1e1e1e;

}

.study-formula-card__head {

  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 6px;

}

.study-formula-card__head strong {

  font-size: 13.5px;

  color: #ffffff;

}

.study-formula-card__head span {

  font-size: 10.5px;

  font-family: var(--font-mono, monospace);

  color: #e2601f;

}

.study-formula-card__math {

  font-family: var(--font-mono, monospace);

  font-size: 13px;

  background: #0f0f0f;

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 5px;

  padding: 8px 12px;

  color: #fcd34d;

  margin: 6px 0;

  overflow-x: auto;

  white-space: pre-wrap;

  word-break: break-all;

}

.study-formula-card__desc {

  font-size: 12px;

  color: #9ca3af;

  margin: 4px 0 8px;

  line-height: 1.45;

}

.study-formula-card__foot {

  display: flex;

  align-items: center;

  justify-content: space-between;

  font-size: 11px;

}



/* ---------- TAB 5: POMODORO TIMER ---------- */

.study-pomo-wrap {

  display: flex;

  flex-direction: column;

  align-items: center;

  text-align: center;

  gap: 18px;

  padding: 10px 0;

}

.study-pomo-modes {

  display: flex;

  gap: 6px;

  background: #181818;

  padding: 4px;

  border-radius: 999px;

  border: 1px solid rgba(255, 255, 255, 0.1);

}

.study-pomo-mode-btn {

  background: transparent;

  border: none;

  color: #9ca3af;

  font-size: 11.5px;

  font-weight: 700;

  padding: 6px 14px;

  border-radius: 999px;

  cursor: pointer;

  transition: all 0.15s ease;

  font-family: inherit;

}

.study-pomo-mode-btn.active {

  background: #e2601f;

  color: #fff;

}

.study-pomo-dial {

  position: relative;

  width: 180px;

  height: 180px;

  display: flex;

  align-items: center;

  justify-content: center;

}

.study-pomo-dial svg {

  transform: rotate(-90deg);

  width: 100%;

  height: 100%;

}

.study-pomo-dial circle {

  fill: none;

  stroke-width: 8;

}

.study-pomo-circle-bg {

  stroke: rgba(255, 255, 255, 0.08);

}

.study-pomo-circle-fg {

  stroke: #e2601f;

  stroke-linecap: round;

  transition: stroke-dashoffset 0.4s ease;

}

.study-pomo-time-display {

  position: absolute;

  display: flex;

  flex-direction: column;

  align-items: center;

}

.study-pomo-time-display strong {

  font-size: 38px;

  font-family: var(--font-mono, monospace);

  font-weight: 700;

  color: #ffffff;

  letter-spacing: -0.02em;

}

.study-pomo-time-display span {

  font-size: 11px;

  text-transform: uppercase;

  letter-spacing: 0.1em;

  color: #9ca3af;

  font-family: var(--font-mono, monospace);

}

.study-pomo-controls {

  display: flex;

  gap: 10px;

}

.study-pomo-stats {

  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 10px;

  width: 100%;

  margin-top: 10px;

}

.study-pomo-stat-box {

  background: #181818;

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 8px;

  padding: 10px;

  text-align: center;

}

.study-pomo-stat-box strong {

  display: block;

  font-size: 20px;

  font-family: var(--font-mono, monospace);

  color: #e2601f;

}

.study-pomo-stat-box span {

  font-size: 11px;

  color: #9ca3af;

}



/* ---------- TAB 6: READER CONTROLS & ZEN MODE ---------- */

.study-reader-group {

  display: flex;

  flex-direction: column;

  gap: 8px;

  background: #181818;

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 8px;

  padding: 14px;

}

.study-reader-group label {

  font-size: 12px;

  font-weight: 700;

  color: #9ca3af;

  text-transform: uppercase;

  letter-spacing: 0.08em;

  font-family: var(--font-mono, monospace);

}

.study-segmented-btn {

  display: flex;

  background: #111111;

  border-radius: 6px;

  padding: 3px;

  gap: 3px;

}

.study-segmented-btn button {

  flex: 1;

  background: transparent;

  border: none;

  color: #9ca3af;

  padding: 6px 10px;

  border-radius: 5px;

  font-size: 12px;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.15s ease;

  font-family: inherit;

}

.study-segmented-btn button.active {

  background: #e2601f;

  color: #ffffff;

}



/* Unit Completion Checklist */

.study-checklist {

  display: flex;

  flex-direction: column;

  gap: 8px;

}

.study-check-item {

  display: flex;

  align-items: center;

  gap: 10px;

  background: #181818;

  border: 1px solid rgba(255, 255, 255, 0.08);

  border-radius: 6px;

  padding: 8px 12px;

  cursor: pointer;

  font-size: 12.5px;

  transition: all 0.15s ease;

}

.study-check-item:hover {

  background: #1f1f1f;

}

.study-check-item input[type="checkbox"] {

  accent-color: #e2601f;

  width: 16px;

  height: 16px;

  cursor: pointer;

}

.study-check-item.done span {

  text-decoration: line-through;

  color: #6b7280;

}



body.study-zen-mode .docsnav,

body.study-zen-mode .app-header,

body.study-zen-mode .app-footer,

body.study-zen-mode #pdfbar,

body.study-zen-mode .guide-mobile-bar,

body.study-zen-mode .crumbs {

  display: none !important;

}

body.study-zen-mode .guide-main {

  margin: 0 auto !important;

  width: min(880px, 100%) !important;

  max-width: 880px !important;

  padding: 40px 20px 100px !important;

}



/* Font Size / Family overrides via data attributes */

body[data-study-size="sm"] p, body[data-study-size="sm"] li { font-size: 0.94em; }

body[data-study-size="lg"] p, body[data-study-size="lg"] li { font-size: 1.12em; line-height: 1.75; }

body[data-study-size="xl"] p, body[data-study-size="xl"] li { font-size: 1.24em; line-height: 1.85; }



body[data-study-font="serif"] { font-family: Georgia, "Merriweather", serif !important; }

body[data-study-font="serif"] p, body[data-study-font="serif"] li { font-family: Georgia, "Merriweather", serif !important; }

body[data-study-font="mono"] { font-family: "DM Mono", Menlo, Consolas, monospace !important; }



/* Print styling */

@media print {

  #studyProgressBar,

  .study-dock,

  .study-drawer,

  .study-backdrop,

  .study-selection-bar,

  .study-hl-popover {

    display: none !important;

  }

  .study-hl {

    background: transparent !important;

    border: none !important;

    color: inherit !important;

  }

}



/* Responsive */

@media (max-width: 768px) {

  .study-dock {

    right: 12px;

    bottom: 14px;

    padding: 4px 6px;

  }

  .study-dock__btn {

    padding: 6px 10px;

    font-size: 11px;

  }

  .study-drawer {

    width: 100vw;

  }

  .study-marker-toolbar {

    top: auto;

    bottom: 76px;

    width: calc(100vw - 24px);

    border-radius: 16px;

  }

}



/* ============================================================

   SCREEN MARKER & CANVAS FREEHAND ANNOTATOR

   ============================================================ */

.study-marker-canvas {

  position: fixed !important;

  top: 0 !important;

  left: 0 !important;

  width: 100vw !important;

  height: 100vh !important;

  z-index: 92 !important;

  pointer-events: none;

  touch-action: none;

  background: transparent !important;

}

.study-marker-canvas:not(.active),

.study-marker-canvas.hidden-ink {

  display: none !important;

}

.study-marker-canvas.active {

  pointer-events: auto;

  cursor: crosshair;

}

.study-marker-canvas.tool-eraser {

  cursor: cell;

}



/* Floating Screen Marker Toolbar */

.study-marker-toolbar {

  position: fixed;

  top: calc(var(--nav-h, 60px) + 14px);

  left: 50%;

  transform: translateX(-50%) translateY(-20px);

  z-index: 96;

  display: flex;

  align-items: center;

  gap: 8px;

  background: rgba(18, 18, 18, 0.94);

  color: #f5f3ee;

  border: 1px solid rgba(255, 255, 255, 0.2);

  border-radius: 999px;

  padding: 6px 14px;

  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);

  backdrop-filter: blur(16px);

  -webkit-backdrop-filter: blur(16px);

  font-family: var(--font-sans, "Manrope", sans-serif);

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);

  max-width: 95vw;

  overflow-x: auto;

  scrollbar-width: none;

}

.study-marker-toolbar::-webkit-scrollbar {

  display: none;

}

.study-marker-toolbar.active {

  opacity: 1;

  pointer-events: auto;

  transform: translateX(-50%) translateY(0);

}



.study-marker-group {

  display: flex;

  align-items: center;

  gap: 4px;

  padding: 0 4px;

  border-right: 1px solid rgba(255, 255, 255, 0.14);

}

.study-marker-group:last-child {

  border-right: none;

}



.study-marker-btn {

  background: transparent;

  border: none;

  color: #d1d5db;

  font-size: 13px;

  font-weight: 700;

  padding: 6px 10px;

  border-radius: 999px;

  cursor: pointer;

  display: inline-flex;

  align-items: center;

  gap: 5px;

  transition: all 0.15s ease;

  font-family: inherit;

  white-space: nowrap;

}

.study-marker-btn:hover {

  background: rgba(255, 255, 255, 0.12);

  color: #ffffff;

}

.study-marker-btn.active {

  background: #e2601f;

  color: #ffffff;

}



.study-marker-color-btn {

  width: 20px;

  height: 20px;

  border-radius: 50%;

  border: 2px solid transparent;

  cursor: pointer;

  transition: transform 0.15s ease, border-color 0.15s ease;

  padding: 0;

}

.study-marker-color-btn:hover {

  transform: scale(1.2);

}

.study-marker-color-btn.active {

  border-color: #ffffff;

  transform: scale(1.15);

  box-shadow: 0 0 0 2px rgba(226, 96, 31, 0.6);

}



.study-stroke-select {

  background: #222;

  border: 1px solid rgba(255, 255, 255, 0.2);

  color: #fff;

  border-radius: 6px;

  font-size: 11px;

  padding: 4px 6px;

  cursor: pointer;

}



/* Instant Highlighter Wand Mode */

body.study-wand-active,

body.study-wand-active * {

  cursor: crosshair !important;

}



body.study-wand-active ::selection {

  background: #fde047 !important;

  color: #1a1a1a !important;

}



#studyDockWandBtn.wand-active {

  background: rgba(234, 179, 8, 0.25) !important;

  border-color: #eab308 !important;

  color: #fde047 !important;

  box-shadow: 0 0 12px rgba(234, 179, 8, 0.45) !important;

}





/* Calculator & Math Tools Tab */

.study-calc-card {

  background: #181818;

  border: 1px solid rgba(255, 255, 255, 0.1);

  border-radius: 8px;

  padding: 14px;

  display: flex;

  flex-direction: column;

  gap: 10px;

}

.study-calc-card h4 {

  margin: 0;

  font-size: 13.5px;

  font-weight: 700;

  color: #ffffff;

}

.study-calc-inputs {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));

  gap: 8px;

}

.study-calc-field {

  display: flex;

  flex-direction: column;

  gap: 4px;

}

.study-calc-field label {

  font-size: 10.5px;

  font-family: var(--font-mono, monospace);

  color: #9ca3af;

  text-transform: uppercase;

}

.study-calc-field input {

  background: #111;

  border: 1px solid rgba(255, 255, 255, 0.15);

  border-radius: 5px;

  padding: 6px 8px;

  color: #f5f3ee;

  font-family: var(--font-mono, monospace);

  font-size: 13px;

}

.study-calc-field input:focus {

  outline: none;

  border-color: #e2601f;

}

.study-calc-results {

  display: flex;

  flex-wrap: wrap;

  gap: 8px;

  margin-top: 4px;

}

.study-calc-pill {

  background: rgba(226, 96, 31, 0.14);

  border: 1px solid rgba(226, 96, 31, 0.35);

  border-radius: 6px;

  padding: 6px 10px;

  display: inline-flex;

  flex-direction: column;

  gap: 2px;

}

.study-calc-pill span {

  font-size: 10px;

  text-transform: uppercase;

  color: #9ca3af;

  font-family: var(--font-mono, monospace);

}

.study-calc-pill strong {

  font-size: 14px;

  font-family: var(--font-mono, monospace);

  color: #f5f3ee;

}



/* Ambient Focus Audio Player */

.study-audio-grid {

  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 8px;

}

.study-audio-tile {

  background: #151515;

  border: 1px solid rgba(255, 255, 255, 0.1);

  border-radius: 8px;

  padding: 12px;

  display: flex;

  flex-direction: column;

  gap: 8px;

  cursor: pointer;

  transition: all 0.15s ease;

}

.study-audio-tile:hover {

  background: #1d1d1d;

  border-color: rgba(226, 96, 31, 0.4);

}

.study-audio-tile.playing {

  border-color: #10b981;

  background: rgba(16, 185, 129, 0.1);

}

.study-audio-tile-head {

  display: flex;

  align-items: center;

  justify-content: space-between;

  font-size: 12.5px;

  font-weight: 700;

  color: #fff;

}

.study-audio-wave {

  height: 4px;

  width: 100%;

  background: rgba(255, 255, 255, 0.1);

  border-radius: 999px;

  overflow: hidden;

  position: relative;

}

.study-audio-tile.playing .study-audio-wave::after {

  content: "";

  position: absolute;

  inset: 0;

  background: #10b981;

  animation: waveAnim 1s infinite alternate;

}

@keyframes waveAnim {

  0% { transform: scaleX(0.2); }

  100% { transform: scaleX(1); }

}



/* Read Aloud Speech status banner */

.study-tts-banner {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 10px;

  background: #1a1a1a;

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 8px;

  padding: 10px 14px;

  margin-bottom: 12px;

}



/* ============================================================
   NO DISTRACTION / ZEN FOCUS HUD & ACTIVE STUDY TOOLS
   ============================================================ */

/* Floating Zen HUD (Minimalist Control Bar in Zen Mode) */
.study-zen-hud {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 18, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-family: var(--font-sans, "Manrope", sans-serif);
  color: #f5f3ee;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
body.study-zen-mode .study-zen-hud {
  opacity: 0.88;
  pointer-events: auto;
}
body.study-zen-mode .study-zen-hud:hover {
  opacity: 1;
}

.study-zen-hud__btn {
  background: transparent;
  border: none;
  color: #d1d5db;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}
.study-zen-hud__btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.study-zen-hud__btn.active {
  background: #e2601f;
  color: #ffffff;
}
.study-zen-hud__btn--exit {
  color: #f87171 !important;
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.study-zen-hud__btn--exit:hover {
  background: rgba(239, 68, 68, 0.2) !important;
}

.study-zen-hud__sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
}

/* Zen width options */
body.study-zen-mode[data-zen-width="narrow"] .guide-main {
  max-width: 680px !important;
  width: min(680px, 100%) !important;
}
body.study-zen-mode[data-zen-width="balanced"] .guide-main {
  max-width: 820px !important;
  width: min(820px, 100%) !important;
}
body.study-zen-mode[data-zen-width="wide"] .guide-main {
  max-width: 980px !important;
  width: min(980px, 100%) !important;
}

/* Paragraph Focus Lens (Spotlight) */
body.study-lens-active .guide-main p,
body.study-lens-active .guide-main li,
body.study-lens-active .guide-main .box,
body.study-lens-active .guide-main .formula,
body.study-lens-active .guide-main .worked,
body.study-lens-active .guide-main figure {
  transition: opacity 0.22s ease, filter 0.22s ease;
  opacity: 0.2;
  filter: blur(0.2px);
}
body.study-lens-active .guide-main .study-lens-focus {
  opacity: 1 !important;
  filter: none !important;
  transform: scale(1.003);
}

/* Reading Ruler */
#studyReadingRuler {
  position: absolute;
  left: 0;
  width: 100%;
  height: 38px;
  pointer-events: none;
  z-index: 50;
  border-top: 1.5px solid rgba(226, 96, 31, 0.65);
  border-bottom: 1.5px solid rgba(226, 96, 31, 0.65);
  background: linear-gradient(180deg, rgba(226, 96, 31, 0.08) 0%, rgba(226, 96, 31, 0.03) 100%);
  display: none;
  transition: top 0.06s ease-out;
  box-shadow: 0 0 14px rgba(226, 96, 31, 0.18);
}
body.study-ruler-active #studyReadingRuler {
  display: block;
}

/* Bionic Typography */
.bionic-bold {
  font-weight: 800 !important;
  color: #ffffff !important;
}
[data-theme="light"] .bionic-bold {
  color: #000000 !important;
}

/* Exam Readiness Gauge & Syllabus Checklist */
.study-readiness-card {
  background: linear-gradient(145deg, #181818, #131313);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.study-readiness-meter {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.study-readiness-val {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  color: #e2601f;
}
.study-readiness-desc {
  font-size: 11.5px;
  color: #9ca3af;
}
.study-readiness-bar-wrap {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.study-readiness-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e2601f, #10b981);
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.study-check-group-title {
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  text-transform: uppercase;
  color: var(--accent-ink, #f57a3f);
  letter-spacing: 0.1em;
  margin: 14px 0 6px;
}

.study-checklist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.study-checklist-row:hover {
  background: #1f1f1f;
  border-color: rgba(226, 96, 31, 0.4);
}
.study-checklist-row.checked {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}
.study-checklist-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #10b981;
  cursor: pointer;
}
.study-checklist-row label {
  font-size: 13px;
  cursor: pointer;
  flex: 1;
}
.study-checklist-row.checked label {
  text-decoration: line-through;
  color: #9ca3af;
}

/* Keyboard Shortcuts Cheat Sheet Modal */
.study-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.study-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}
.study-modal-card {
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  width: min(520px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  padding: 22px;
  color: #f5f3ee;
  font-family: var(--font-sans, "Manrope", sans-serif);
}
.study-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}
.study-modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.study-modal-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 20px;
  cursor: pointer;
}
.study-modal-close:hover {
  color: #fff;
}
.study-shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}
.study-shortcut-row kbd {
  font-family: var(--font-mono, monospace);
  background: #222;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  color: #f57a3f;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}


/* Hide docks and sidebar chrome completely during Zen Mode */
body.study-zen-mode .study-dock,
body.study-zen-mode .study-marker-toolbar,
body.study-zen-mode .study-selection-bar,
body.study-zen-mode .guide-aside,
body.study-zen-mode .guide-subnav {
  display: none !important;
}
