/* Shared Grit application tokens: no rules apply outside this site's brand. */
body.grit-brand {
  --vr-cyan: var(--grit-burgundy); --vr-violet: var(--grit-burgundy);
  --vr-body: var(--grit-text); --vr-muted: var(--grit-caption);
  --vr-surface: var(--grit-surface); --vr-border: var(--grit-blush);
  --bg-l1: var(--grit-blush-bg); --bg-l2: var(--grit-surface); --bg-l3: var(--grit-blush);
  --lp-primary-color: var(--grit-burgundy); --lp-text-color: var(--grit-text);
  --lp-secondary-color: var(--grit-caption); --lp-border-color: var(--grit-blush);
  --wp--preset--font-family--orbitron: var(--grit-font-body);
}
body.grit-brand header :is(.vr-logo, .grit-logo, .wp-block-site-title) :is(span, strong),
body.grit-brand header .wp-block-navigation a span { color: inherit !important; -webkit-text-fill-color: currentColor !important; }
body.grit-brand header :is(.vr-logo-accent, .grit-logo .accent) { color: var(--grit-gold) !important; -webkit-text-fill-color: currentColor !important; }
body.grit-brand header.wp-block-template-part a.vr-logo.grit-logo:not(.wp-element-button) { color: #fff !important; -webkit-text-fill-color: currentColor !important; }
body.grit-brand header.wp-block-template-part .wp-block-navigation .wp-block-navigation-item > a.wp-block-navigation-item__content { color: #fff !important; -webkit-text-fill-color: currentColor !important; }
body.grit-brand header.wp-block-template-part .wp-block-navigation .wp-block-navigation-item:last-child > a.wp-block-navigation-item__content { color: var(--grit-dark) !important; }
body.grit-brand #siera-avatar-toggle {
  background: var(--grit-burgundy) !important; color: #fff !important;
  font-family: var(--grit-font-body) !important; box-shadow: var(--grit-shadow-nav);
}
body.grit-brand #siera-avatar-toggle * { color: inherit !important; -webkit-text-fill-color: currentColor !important; }
body.grit-brand #siera-avatar-panel {
  background: var(--grit-blush-bg) !important; border-color: var(--grit-blush) !important;
  box-shadow: -12px 0 36px rgba(77,0,29,.15);
}
/* Quiz reading, controls and states. Correct/incorrect colors remain semantic. */
body.grit-brand :is(.lp-quiz-content, .quiz-content, .quiz-intro, .quiz-result, .quiz-results, .question-content, .question-title, .question-explanation, .question-hint, .quiz-summary) {
  color: var(--grit-text) !important; -webkit-text-fill-color: currentColor !important;
  font-family: var(--grit-font-body) !important;
}
body.grit-brand :is(.question-title, .question-content, .answer-options, .question-answers, .quiz-intro, .quiz-results) :is(p, span, label, div, li, h2, h3) {
  color: var(--grit-text) !important; -webkit-text-fill-color: currentColor !important;
  font-family: var(--grit-font-body) !important; font-style: normal !important;
}
body.grit-brand :is(.answer-option, .answer-option label, .question-answers li) {
  background: var(--grit-surface) !important; border-color: var(--grit-blush) !important;
  color: var(--grit-text) !important; border-radius: 10px;
}
body.grit-brand .answer-option:hover { border-color: var(--grit-burgundy) !important; }
body.grit-brand .answer-option:has(input:checked) { background: var(--grit-blush) !important; border-color: var(--grit-burgundy) !important; }
body.grit-brand .answer-option input { accent-color: var(--grit-burgundy); }
body.grit-brand :is(.quiz-status, .quiz-status > div, .quiz-status .countdown) {
  background: var(--grit-blush) !important; color: var(--grit-dark) !important;
  -webkit-text-fill-color: currentColor !important; border-color: var(--grit-blush) !important;
}
body.grit-brand .quiz-status * { color: var(--grit-dark) !important; -webkit-text-fill-color: currentColor !important; }
body.grit-brand :is(.quiz-content, .quiz-status, .quiz-buttons, .quiz-intro, .quiz-result, .quiz-results, .question) :is(button, .button, input[type="submit"]),
body.grit-brand :is(.lp-button.start-quiz, .lp-button.finish-quiz, .lp-button.check-answer, .questions-pagination a, .questions-pagination button) {
  background: var(--grit-coral) !important; color: var(--grit-dark) !important;
  -webkit-text-fill-color: currentColor !important; border: 1px solid var(--grit-coral) !important;
  border-radius: 8px !important; font-family: var(--grit-font-body) !important;
  font-style: normal !important; min-height: 44px; text-shadow: none !important;
}
body.grit-brand :is(.questions-pagination .current, .questions-pagination .active) {
  background: var(--grit-burgundy) !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
}
body.grit-brand :is(.answer-option.correct, .answer-option.answered-correctly) { border-color: #247445 !important; }
body.grit-brand :is(.answer-option.incorrect, .answer-option.answered-wrong) { border-color: #a52d39 !important; }
/* My Learning uses readable body type rather than the display serif in tables. */
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, .lp-profile-right) { min-width: 0 !important; max-width: 100%; }
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content) :is(h1, h2, h3) { color: var(--grit-burgundy) !important; -webkit-text-fill-color: currentColor !important; }
body.grit-brand.grit-surface-profile :is(.lp-list-table, #profile-content table, .lp-profile-content table) {
  width: 100%; border-collapse: collapse; color: var(--grit-text) !important;
  font-family: var(--grit-font-body) !important; background: var(--grit-surface) !important;
}
body.grit-brand.grit-surface-profile :is(.lp-list-table, #profile-content table, .lp-profile-content table) :is(th, td) {
  background: var(--grit-surface) !important; color: var(--grit-text) !important;
  -webkit-text-fill-color: currentColor !important; font-family: var(--grit-font-body) !important;
  font-style: normal !important; border-color: var(--grit-blush) !important;
  padding: 14px 16px !important; line-height: 1.5;
}
body.grit-brand.grit-surface-profile :is(.lp-list-table, #profile-content table, .lp-profile-content table) tr:nth-child(even) td { background: var(--grit-blush-bg) !important; }
body.grit-brand.grit-surface-profile :is(.lp-list-table, #profile-content table, .lp-profile-content table) th { background: var(--grit-blush) !important; }
body.grit-brand.grit-surface-profile :is(.lp-list-table, #profile-content table, .lp-profile-content table) :is(a, span, strong, p) {
  color: inherit !important; -webkit-text-fill-color: currentColor !important;
  font-family: var(--grit-font-body) !important; font-style: normal !important;
  background-image: none !important;
}
body.grit-brand.grit-surface-profile :is(.lp-list-table, #profile-content table, .lp-profile-content table) :is(a, .course-title) {
  white-space: normal !important; text-overflow: clip !important; overflow: visible !important;
  max-width: none !important; color: var(--grit-burgundy) !important; font-size: 1rem !important;
}
body.grit-brand .sls-journal-link {
  background: var(--grit-blush) !important; background-image: none !important;
  color: var(--grit-burgundy) !important; -webkit-text-fill-color: currentColor !important;
  font-family: var(--grit-font-body) !important; font-style: normal !important;
  border: 1px solid var(--grit-burgundy) !important; border-radius: 8px;
}
body.grit-brand .grit-table-scroll { max-width: 100%; overflow-x: auto; border-radius: 12px; }
body.grit-brand .grit-table-scroll:focus-visible { outline: 2px solid var(--grit-burgundy); outline-offset: 3px; }
/* Existing credential component: visual styling only, no visibility/pilot change. */
body.grit-brand .siera-backpack {
  --backpack-cyan: var(--grit-burgundy); --backpack-teal: var(--grit-coral);
  --backpack-navy: var(--grit-blush-bg); background: var(--grit-blush-bg) !important;
  color: var(--grit-text) !important; border-color: var(--grit-blush) !important;
  font-family: var(--grit-font-body) !important;
}
body.grit-brand .siera-backpack :is(h2, h3, summary, strong, b) { color: var(--grit-burgundy) !important; -webkit-text-fill-color: currentColor !important; }
body.grit-brand .siera-backpack :is(p, span, label, .siera-backpack__filter-summary) { color: var(--grit-caption) !important; }
body.grit-brand .siera-backpack :is(.siera-backpack__card, .siera-backpack__progress, .siera-backpack__program, .siera-backpack__empty, .siera-backpack__notice, .siera-backpack__empty-filter) {
  background: var(--grit-surface) !important; border-color: var(--grit-blush) !important;
}
body.grit-brand .siera-backpack :is(select, .siera-backpack__tabs button) { background: var(--grit-surface) !important; color: var(--grit-burgundy) !important; border-color: var(--grit-burgundy) !important; }
body.grit-brand .siera-backpack .siera-backpack__tabs button[aria-selected="true"] { background: var(--grit-burgundy) !important; color: #fff !important; }
body.grit-brand .siera-backpack a { color: var(--grit-burgundy) !important; text-decoration: underline; }
body.grit-brand .siera-backpack :is(.siera-backpack__shield, .siera-backpack__badge) { background: var(--grit-burgundy) !important; color: #fff !important; box-shadow: none; }
body.grit-brand .siera-backpack .siera-backpack__badge span { background: var(--grit-blush-bg) !important; color: var(--grit-burgundy) !important; }
body.grit-brand .siera-backpack .siera-backpack__track { background: var(--grit-blush) !important; }
body.grit-brand .siera-backpack .siera-backpack__track span { background: var(--grit-burgundy) !important; }
body.grit-brand .siera-backpack :is(button, select):focus-visible { outline-color: var(--grit-burgundy) !important; }
body.grit-brand .siera-backpack .siera-backpack__card-meta mark { color: #155b36 !important; background: #e5f3e9 !important; }
body.grit-brand .siera-backpack .siera-backpack__card-meta mark:is(.is-pending, .is-queued, .is-submitting, .is-processing, .is-waiting_for_approval) { color: #6c4712 !important; background: #fff0cd !important; }
body.grit-brand .siera-backpack .siera-backpack__card-meta mark:is(.is-failed, .is-cancelled) { color: #8e2331 !important; background: #fce5e9 !important; }
body.grit-brand .siera-backpack .siera-backpack__card-meta mark.is-preview { color: var(--grit-burgundy) !important; background: var(--grit-blush) !important; }
@media(max-width:640px) {
  body.grit-brand .grit-table-scroll table { min-width: 620px; }
  body.grit-brand .siera-backpack__header { align-items: flex-start; }
  body.grit-brand .siera-backpack__card-meta { flex-wrap: wrap; }
  body.grit-brand .quiz-status { flex-wrap: wrap; gap: 12px; }
}

/* My Learning: reset legacy title clamps and let table rows fit their content. */
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress thead { display: table-header-group !important; }
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress tbody { display: table-row-group !important; }
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress tr { display: table-row !important; }
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress :is(th, td) { display: table-cell !important; position: static !important; }
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress th {
  font-size: 12px !important;
  line-height: 1.35 !important;
  letter-spacing: .03em !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress :is(th, td):nth-child(2) { width: 40% !important; }
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress :is(th, td):nth-child(3) { width: 10% !important; }
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress :is(th, td):nth-child(4) { width: 14% !important; }
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress :is(th, td):nth-child(5) { width: 10% !important; }
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 920px !important;
  display: table !important;
}
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress :is(tr, th, td) {
  height: auto !important;
  max-height: none !important;
  vertical-align: middle !important;
}
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress :is(th, td):first-child { width: 96px !important; }
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress :is(th, td):last-child { width: 112px !important; }
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress td {
  padding: 16px !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
}
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress td:nth-child(2) > a,
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress td :is(h3, .course-title, .course-title a, .course-title span, .course-name, .lp-course-title, .column-course > a, .column-course .course-title, .course-info h3) {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: auto !important;
  max-width: none !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
  margin: 0 !important;
  min-width: 0 !important;
}
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress td:first-child img {
  width: 64px !important;
  height: 40px !important;
  max-width: 64px !important;
  flex: 0 0 64px !important;
  object-fit: cover;
  border-radius: 6px;
}
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress a.sls-journal-link,
body.grit-brand.grit-surface-profile :is(#profile-content, .lp-profile-content, #learn-press-profile) .grit-table-scroll > table.lp_profile_course_progress a.sls-journal-link--table {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 40px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: .02em !important;
  white-space: nowrap !important;
  width: auto !important;
  text-transform: none !important;
}

/* Grit production lesson chrome — 20261023-header-review. */
body.grit-brand.viewing-course-item {
  background: var(--grit-blush-bg, #fff5f5) !important;
}
/* The shared theme reserves a site-header slot after LearnPress hides that header. */
body.grit-brand.viewing-course-item .wp-site-blocks {
  padding-top: 0 !important;
}

/* Grit Backpack review contrast — 20261024-backpack-review. */
body.grit-brand #profile-content .siera-backpack .siera-review-card {
  background: #fff !important;
  color: #1a1a1a !important;
  border-color: #f1cbd2 !important;
}
body.grit-brand #profile-content .siera-backpack .siera-review-card h4,
body.grit-brand #profile-content .siera-backpack .siera-review-state,
body.grit-brand #profile-content .siera-backpack .siera-review-card summary {
  color: #4d001d !important;
}
body.grit-brand #profile-content .siera-backpack .siera-review-card a,
body.grit-brand #profile-content .siera-backpack .siera-review-card button {
  background: #ffe4e4 !important;
  color: #4d001d !important;
  border-color: #4d001d !important;
}
body.grit-brand #profile-content .siera-backpack .siera-review-card a:focus-visible,
body.grit-brand #profile-content .siera-backpack .siera-review-card button:focus-visible,
body.grit-brand #profile-content .siera-backpack .siera-review-card summary:focus-visible {
  outline: 2px solid #4d001d;
  outline-offset: 3px;
}
