/* Shared visual refinements. Keep the established layout and learning states. */

/* Informational text must stay readable, including unavailable book notices. */
.library-light-note,
.upcoming-book .exam-book-action {
  color: var(--muted);
}

.book-availability,
.exam-book-note,
.upcoming-book .exam-book-action,
.mastery-bottomline {
  font-weight: 500;
}

.upcoming-book .exam-book-action {
  font-size: 11px;
}

.mastery-topline .text-button,
.undo-last,
.correct-impression,
.group-word-receipt > .text-button {
  font-weight: 600;
}

/* A clear return affordance; solid green remains the next-step action. */
.topbar .book-breadcrumb > .back-to-books {
  background: var(--surface);
  border-color: var(--green);
  color: var(--green);
  box-shadow: none;
}

.topbar .book-breadcrumb > .back-to-books:hover {
  background: var(--green-light);
}

.conceal-button.recall-toggle:not(:disabled):not([aria-pressed="true"]) {
  background: #f2e4b9;
  border-color: #c6b071;
  color: #665122;
  box-shadow: none;
}

.conceal-button.recall-toggle:not(:disabled):not([aria-pressed="true"]):hover {
  background: #eaddad;
  box-shadow: none;
}

/* Three honest answers, with equal emphasis before the learner chooses. */
.result-bar.impression-stage .mark-button.unknown:not(.selected) {
  background: #f2e6df;
  border-color: #cba894;
  color: #814d37;
}

.result-bar.impression-stage .mark-button.fuzzy:not(.selected) {
  background: #f1ebda;
  border-color: #c7b77f;
  color: #78602e;
}

.result-bar.impression-stage .mark-button.known:not(.selected) {
  background: #e4ecdf;
  border-color: #a8bf9d;
  color: #3c5e47;
}

.result-bar.impression-stage .mark-button small {
  font-weight: 500;
  opacity: 1;
}

/* The helper blue and target orange retain their separate meanings. */
:root:not([data-theme="night"]) .near-member.is-helper {
  --cell-muted: #46677b;
}

/* Night surfaces keep the same hierarchy without introducing bright panels. */
:root[data-theme="night"] .topbar .book-breadcrumb > .back-to-books {
  background: var(--surface);
  border-color: #8fa77d;
  color: var(--green);
  box-shadow: none;
}

:root[data-theme="night"] .topbar .book-breadcrumb > .back-to-books:hover {
  background: var(--green-light);
}

:root[data-theme="night"] .conceal-button.recall-toggle:not(:disabled):not([aria-pressed="true"]) {
  background: #49432f;
  border-color: #8f7c4d;
  color: #ebd8a2;
  box-shadow: none;
}

:root[data-theme="night"] .conceal-button.recall-toggle:not(:disabled):not([aria-pressed="true"]):hover {
  background: #554c33;
}

:root[data-theme="night"] .result-bar.impression-stage .mark-button.unknown:not(.selected) {
  background: #4c3b32;
  border-color: #866653;
  color: #ebc2a9;
}

:root[data-theme="night"] .result-bar.impression-stage .mark-button.fuzzy:not(.selected) {
  background: #4b4430;
  border-color: #7c7151;
  color: #e9d29c;
}

:root[data-theme="night"] .result-bar.impression-stage .mark-button.known:not(.selected) {
  background: #354936;
  border-color: #6f8962;
  color: #c8dfb7;
}

@media (max-width: 760px) {
  /* Use the space already reserved by the original cards and controls. */
  .book-availability {
    font-size: 11px;
    line-height: 13.2px;
  }

  .exam-book-note {
    font-size: 11px;
    line-height: 16px;
  }

  .mastery-topline .text-button,
  .mastery-bottomline {
    font-size: 11px;
  }

  .result-bar-heading > span {
    font-size: 11px;
    line-height: 14.85px;
    font-weight: 500;
  }

  .undo-last {
    font-size: 11px;
  }

  .result-bar.impression-stage .mark-button small {
    font-size: 11px;
    line-height: 12.6px;
  }

  .word-eyebrow .status-badge {
    font-size: 11px;
    line-height: 13.2px;
  }

  .near-target-tag {
    font-size: 11px;
    line-height: 12.6px;
  }

  .group-word-receipt .status-badge,
  .group-word-receipt > .text-button {
    font-size: 11px;
    line-height: 16.5px;
  }
}
