/* The artwork is public; real book covers stay in authenticated DOM images. */
.home-study-promo {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 39%);
  align-items: center;
  width: 100%;
  min-height: 222px;
  margin: 16px 0 0;
  padding: clamp(22px, 3.4vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(112, 127, 220, .32);
  border-radius: 24px;
  background: radial-gradient(circle at 78% 30%, #454b9f, transparent 48%), #0b1234;
  box-shadow: 0 18px 38px rgba(16, 28, 73, .18);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.home-study-promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 43px rgba(16, 28, 73, .23);
}

.home-study-promo:focus-visible {
  outline: 3px solid #b9c3ff;
  outline-offset: 3px;
}

.home-study-promo::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 11, 35, .92), rgba(9, 16, 48, .78) 43%, rgba(9, 16, 48, .1) 100%);
  content: "";
  pointer-events: none;
}

.home-study-promo-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.home-study-promo-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  pointer-events: none;
}

.home-study-promo-copy small {
  color: #b9d4ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
}

.home-study-promo-copy > strong {
  font-size: clamp(23px, 3.1vw, 34px);
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.home-study-promo-copy > span {
  color: #dce3ff;
  font-size: 13px;
  line-height: 1.5;
}

.home-study-promo-copy em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  color: #fff;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.home-study-promo-copy em .icon {
  width: 16px;
  height: 16px;
}

.home-study-promo-books {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 186px;
  padding: 0 6px;
  pointer-events: none;
}

.home-study-promo-books img {
  flex: 0 0 auto;
  width: clamp(78px, 9.1vw, 118px);
  aspect-ratio: 595 / 842;
  margin-left: -20px;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 4px 9px 9px 4px;
  background: #fff;
  box-shadow: 9px 13px 21px rgba(3, 8, 29, .46);
  object-fit: cover;
  transform: rotate(-9deg) translateY(8px);
}

.home-study-promo-books img:first-child { margin-left: 0; }
.home-study-promo-books img:nth-child(2) { z-index: 1; transform: rotate(1deg) translateY(-8px); }
.home-study-promo-books img:nth-child(3) { transform: rotate(10deg) translateY(8px); }

.study-materials-page .study-material-catalog { margin-top: 0; }
.study-materials-page > .study-material-empty { padding: 28px; }

@media (max-width: 680px) {
  .learning-section-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .learning-section-tabs button { gap: 5px; white-space: nowrap; }
  .learning-section-tabs button .icon { width: 16px; height: 16px; }
  .home-study-promo { min-height: 228px; grid-template-columns: minmax(0, 1fr) 35%; }
  .home-study-promo-art { object-position: 78% center; }
  .home-study-promo-books { height: 148px; }
  .home-study-promo-books img { width: clamp(59px, 12vw, 85px); margin-left: -18px; }
}

@media (max-width: 430px) {
  .learning-section-tabs button { font-size: 12px; }
  .home-study-promo { min-height: 234px; padding: 20px; }
  .home-study-promo-copy { gap: 7px; }
  .home-study-promo-copy > strong { font-size: clamp(21px, 6vw, 25px); }
  .home-study-promo-copy > span { max-width: 195px; font-size: 12px; }
  .home-study-promo-books { align-self: end; height: 146px; margin-right: -16px; }
  .home-study-promo-books img { width: clamp(54px, 15vw, 70px); margin-left: -24px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-study-promo { transition: none; }
}

/* Lasso is an explicit edit mode; ordinary one-finger textbook paging stays unchanged. */
.has-note-editor .note-lasso-actions { display: none; }
.has-note-editor .note-editor[data-active-tool="lasso"] .note-lasso-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.has-note-editor .note-editor[data-active-tool="lasso"] :is(.note-colors, .note-thickness-control, .vector-eraser-button, .shape-detail-tools, .pen-only-button) {
  display: none;
}
.has-note-editor .note-lasso-hint {
  flex: 0 0 auto;
  margin-right: 3px;
  color: #53655c;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.has-note-editor .note-lasso-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid #cfdbd4;
  border-radius: 10px;
  background: #fff;
  color: #1e4637;
  font-size: 12px;
  font-weight: 720;
  touch-action: manipulation;
}
.has-note-editor .note-lasso-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.has-note-editor .note-lasso-actions .note-lasso-delete:not(:disabled) { color: #b43c37; }
.has-note-editor .note-lasso-actions button svg { width: 16px; height: 16px; }
.has-note-editor .note-editor[data-active-tool="lasso"] #handPreviewCanvas { cursor: crosshair; }
@media (max-width: 720px) {
  .has-note-editor .note-lasso-hint { max-width: 136px; overflow: hidden; text-overflow: ellipsis; }
  .has-note-editor .note-lasso-actions button { padding-inline: 8px; }
  .has-note-editor .note-lasso-actions button span { display: none; }
}
