/* The help card participates in its originating dialog's native top layer. */
.context-help-card {
  position: fixed;
  z-index: 2147483000;
  box-sizing: border-box;
  width: max-content;
  max-width: min(23rem, calc(100vw - 16px));
  max-height: min(22rem, calc(100dvh - 16px));
  overflow: auto;
  padding: .85rem 1rem;
  border: 1px solid #a47b48;
  border-radius: .8rem;
  background: #fffaf1;
  color: #24211d;
  box-shadow: 0 7px 24px #1b140f36;
  font-family: inherit;
  font-size: calc(.84rem * var(--ui-font-scale, 1));
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
  pointer-events: auto;
  animation: context-help-appear 110ms ease-out;
}
.context-help-card .context-help-title { display: block; color: #725025; font-size: 1.03em; line-height: 1.35; font-weight: 750; }
.context-help-card p { margin: .4em 0 0; color: inherit; font: inherit; line-height: inherit; white-space: pre-line; }
button.context-help-info[data-context-help-control] {
  --context-help-control-size: 1.65rem;
  position: absolute;
  /* Legacy panels style every descendant button as a full-width action.
     These dimensions belong exclusively to the help control. */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  min-width: var(--context-help-control-size) !important;
  max-width: var(--context-help-control-size) !important;
  width: var(--context-help-control-size) !important;
  min-height: var(--context-help-control-size) !important;
  max-height: var(--context-help-control-size) !important;
  height: var(--context-help-control-size) !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  text-align: center !important;
  vertical-align: middle;
  border: 1px solid #927046;
  border-radius: 50%;
  color: #725025;
  background: #f5edde;
  box-shadow: none;
  font: 700 .8rem/1 Georgia, serif;
  text-transform: none;
  cursor: help;
  transition: background 120ms, border-color 120ms;
}
.context-help-position-parent { position: relative; }
.context-help-anchor { margin-inline-end: 2rem !important; max-inline-size: calc(100% - 2rem); min-inline-size: 0; }
/* WebKit can include the native selected-option width in the page overflow
   even though the select's own rectangle is correctly bounded. */
.person-select select { min-width: 0; max-width: 100%; }
.nav-item.context-help-anchor { height: auto; min-height: 42px; white-space: normal; overflow-wrap: anywhere; padding-block: 8px; }
label.context-help-anchor { min-height: 1.65rem; }
.context-help-cell { padding-inline-end: 2.3rem !important; }
.context-help-cell > .context-help-info { right: 3px; top: 3px; }
.context-help-group > button.context-help-info { position: static; flex: 0 0 auto; align-self: center; justify-self: end; }
.automatic-help-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: 0 0 auto; padding: 7px 10px; min-height: 34px; border: 1px solid var(--rx-line, #c3b5a3); border-radius: 8px; background: var(--rx-soft, #f5edde); color: var(--rx-text, #24211d); font: inherit; font-size: calc(11px * var(--ui-font-scale, 1)); white-space: nowrap; cursor: pointer; }
.automatic-help-button[aria-checked="true"] { color: var(--rx-accent, #725025); background: var(--rx-accent-soft, #ede0cc); border-color: var(--rx-accent, #a47b48); }
.automatic-help-button:focus-visible { outline: 3px solid #b48239; outline-offset: 2px; }
button.context-help-info[data-context-help-control]:hover { background: #e9d3ad; border-color: #725025; }
button.context-help-info[hidden] { display: none !important; }
.context-help-info:focus-visible { outline: 3px solid #b48239; outline-offset: 2px; }
[data-theme="dark"] .context-help-card { color: #f5f0e7; background: #242321; border-color: #c09a64; box-shadow: 0 8px 28px #0008; }
[data-theme="dark"] .context-help-card .context-help-title { color: #e9c38f; }
[data-theme="dark"] button.context-help-info[data-context-help-control] { color: #e9c38f; background: #28241f; border-color: #a07c4c; }
[data-theme="dark"] button.context-help-info[data-context-help-control]:hover { background: #403423; }
@keyframes context-help-appear { from { opacity: 0; } to { opacity: 1; } }
@media (pointer: coarse) {
  button.context-help-info[data-context-help-control] { --context-help-control-size: 44px; font-size: 1rem; }
  .context-help-anchor { margin-inline-end: 48px !important; }
  .context-help-anchor { max-inline-size: calc(100% - 48px); }
  label.context-help-anchor { min-height: 44px; }
  .context-help-cell { padding-inline-end: 48px !important; }
}
@media (max-width: 740px) {
  .topbar:has(.context-help-info:not([hidden])) { height: auto; min-height: 64px; padding-block: 8px; align-items: flex-start; }
  .topbar-actions:has(.context-help-info:not([hidden])) { flex-wrap: wrap; row-gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .context-help-card { animation: none; }
  .context-help-info { transition: none; }
}
@media print {
  button.context-help-info[data-context-help-control], .context-help-card, .automatic-help-button { display: none !important; }
  .context-help-anchor { margin-inline-end: 0 !important; }
}
