/* Cross-section interaction vocabulary. Layout and clinical states stay in their owners. */
.app-shell :is(.button, .icon-button, .pick, .nav-item, .profile-button) {
  transition:
    background-color var(--motion-feedback) ease,
    border-color var(--motion-feedback) ease,
    color var(--motion-fast) ease,
    transform var(--motion-arrive) var(--ease-response);
}
.app-shell :is(.button, .icon-button, .pick):not(:disabled):active {
  transform: scale(0.97);
}
.app-shell :is(.nav-item, .profile-button) > svg {
  transition:
    transform var(--motion-arrive) var(--ease-response),
    color var(--motion-fast) ease;
}
.app-shell :is(.library-card, .tr-upload-card, .tr-format-choice, .review-item, .fmh-progress) {
  transition:
    background-color var(--motion-feedback) ease,
    border-color var(--motion-feedback) ease,
    color var(--motion-fast) ease,
    transform var(--motion-arrive) var(--ease-response);
}
.app-shell .library-card {
  --card-vivid: #0869e8;
  background: var(--surface);
}
.app-shell .library-card.operator-card {
  --card-vivid: #7136df;
}
.app-shell .library-card :is(.eyebrow, strong, span, svg) {
  transition:
    color var(--motion-fast) ease,
    transform var(--motion-arrive) var(--ease-response);
}
.app-shell .library-card:is(:focus-visible, :active) {
  background: var(--card-vivid);
  border-color: var(--card-vivid);
  color: #fff;
  box-shadow: none;
}
.app-shell .library-card:is(:focus-visible, :active) :is(.eyebrow, strong, span, svg) {
  color: #fff;
}
.app-shell .library-card:active {
  transform: scale(0.985);
}
.app-shell .library-card:is(:focus-visible, :active) .library-card-foot {
  border-color: #ffffff40;
}
.app-shell .library-card:is(:focus-visible, :active) .library-card-foot svg {
  background: #ffffff20;
}
.app-shell :is(.tr-format-icon, .account-section-icon) {
  transition:
    background-color var(--motion-feedback) ease,
    color var(--motion-fast) ease;
}
.app-shell .tr-upload-card > svg,
.app-shell :is(.library-card-foot, .tr-upload-card > span) > svg,
.app-shell .account-nav-chevron {
  transition:
    transform var(--motion-arrive) var(--ease-response),
    color var(--motion-fast) ease;
}
.app-shell :is(.tr-upload-card, .tr-format-choice):focus-visible {
  border-color: var(--blue);
  background: var(--surface);
}
.app-shell .tr-format-choice:focus-visible .tr-format-icon {
  background: var(--action);
  color: #fff;
}
.app-shell .account-navigation nav button:focus-visible .account-section-icon {
  background: var(--account-tone);
  color: #fff;
}
.app-shell
  :is(
    .review-tabs button,
    .tr-option-choice,
    .course-option,
    .scheduling-option,
    .gesture-participation-toggle
  ) {
  transition:
    background-color var(--motion-feedback) ease,
    border-color var(--motion-feedback) ease,
    color var(--motion-fast) ease,
    transform var(--motion-arrive) var(--ease-response);
}
.app-shell :is(.review-item, .tr-item, .operation-row, .search-result) {
  transition:
    background-color var(--motion-feedback) ease,
    border-color var(--motion-feedback) ease,
    color var(--motion-fast) ease;
}
.app-shell :is(.operation-row .row-avatar, .tr-item > svg) {
  transition:
    background-color var(--motion-feedback) ease,
    color var(--motion-fast) ease;
}
.app-shell :is(.editor-section, .procedure-editor, .account-panel, .tr-card) {
  transition: border-color var(--motion-feedback) ease;
}
.app-shell :is(.editor-section, .procedure-editor, .account-panel):focus-within {
  border-color: color-mix(in srgb, var(--blue) 55%, var(--line));
}
.app-shell .procedure-editor .gesture-index,
.app-shell .editor-section .section-number {
  transition:
    background-color var(--motion-feedback) ease,
    color var(--motion-fast) ease;
}
.app-shell .procedure-editor:focus-within .gesture-index,
.app-shell .editor-section:focus-within .section-number {
  color: #fff;
  background: var(--action);
}
.app-shell .document-strip {
  transition: border-color var(--motion-feedback) ease;
}
.app-shell .document-strip .doc-icon,
.app-shell .account-disclosure .account-row-icon {
  transition:
    background-color var(--motion-feedback) ease,
    color var(--motion-fast) ease;
}
.app-shell .document-strip:focus-within {
  border-color: var(--blue);
}
.app-shell .document-strip:focus-within .doc-icon {
  background: var(--action);
  color: #fff;
}
.app-shell .account-disclosure[open] > form {
  animation: result-arrive 180ms var(--ease-response) both;
}
.app-shell .global-results:not([hidden]) {
  animation: result-arrive 180ms var(--ease-response) both;
  transform-origin: top center;
}
@keyframes result-arrive {
  from {
    opacity: 0;
    translate: 0 -4px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
@media (hover: hover) and (pointer: fine) {
  .app-shell .nav-item:hover > svg,
  .app-shell .profile-button:hover > svg {
    color: var(--blue);
    transform: translateX(2px);
  }
  .app-shell .library-card:hover {
    background: var(--card-vivid);
    border-color: var(--card-vivid);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: none;
  }
  .app-shell .library-card:hover :is(.eyebrow, strong, span, svg) {
    color: #fff;
  }
  .app-shell .library-card:hover .library-card-foot > svg {
    transform: translateX(4px);
    background: #ffffff20;
  }
  .app-shell .library-card:hover .library-card-foot {
    border-color: #ffffff40;
  }
  .app-shell .library-card:active {
    transform: scale(0.985);
  }
  .app-shell :is(.tr-upload-card, .tr-format-choice):hover {
    border-color: var(--blue);
    background: var(--surface);
    transform: translateY(-2px);
  }
  .app-shell .tr-upload-card:hover > svg {
    transform: translateY(-3px);
  }
  .app-shell .tr-upload-card:hover > span > svg {
    transform: translateX(4px);
  }
  .app-shell .tr-format-choice:hover .tr-format-icon {
    background: var(--action);
    color: #fff;
  }
  .app-shell .account-navigation nav button:hover .account-section-icon {
    background: var(--account-tone);
    color: #fff;
  }
  .app-shell .account-navigation nav button:hover .account-nav-chevron {
    transform: translateX(3px);
    color: var(--blue);
  }
  .app-shell .fmh-progress:hover,
  .app-shell .review-item:hover {
    border-color: var(--blue);
  }
  .app-shell .operation-row:not(.selected):hover .row-avatar {
    background: var(--action);
    color: #fff;
  }
  .app-shell .document-strip:has(button):hover {
    border-color: var(--blue);
  }
  .app-shell .document-strip:has(button):hover .doc-icon,
  .app-shell .account-disclosure > summary:hover .account-row-icon {
    background: var(--action);
    color: #fff;
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell :is(.button, .icon-button, .pick, .library-card, .tr-upload-card, .tr-format-choice),
  .app-shell :is(.nav-item, .profile-button, .library-card-foot) > svg,
  .app-shell .account-nav-chevron {
    transform: none !important;
  }
}
