/* Shared title explanations. Loaded last to isolate controls from page button styles. */
.heading-help-trigger {
    display: inline-grid;
    place-items: center;
    vertical-align: middle;
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-link);
    font: var(--weight-semibold) var(--text-caption)/1 var(--font-ui);
    letter-spacing: normal;
    cursor: pointer;
    touch-action: manipulation;
}
.heading-help-trigger > span {
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    border: 1px solid currentColor;
    border-radius: 50%;
}
.heading-help-trigger:hover,
.heading-help-trigger[aria-expanded="true"] { background: #e3ecdf; }
.heading-help-trigger:focus-visible,
.heading-help-close:focus-visible { outline: 3px solid #587d61; outline-offset: 2px; }
.heading-help-popover {
    position: fixed;
    inset: auto;
    width: min(360px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow: auto;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--control-border);
    border-radius: 12px;
    background: #fff;
    color: var(--text-primary);
    box-shadow: 0 8px 32px #15231b26;
    font: 400 var(--text-small)/var(--leading-body) var(--font-ui);
    text-align: left;
    overflow-wrap: anywhere;
}
.heading-help-popover > [data-heading-help] {
    margin: 0 0 12px;
    padding: 0;
    color: inherit;
    font: inherit;
}
.heading-help-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: #fff;
    color: var(--text-link);
    font: var(--weight-semibold) var(--text-control)/1.5 var(--font-ui);
    cursor: pointer;
}
.heading-help-close:hover { background: #edf2eb; }
@media (pointer: coarse) {
    .heading-help-trigger { width: 44px; height: 44px; min-height: 44px; }
}
@media print {
    .heading-help-trigger, .heading-help-close { display: none; }
    .heading-help-popover[popover] { display: block; position: static; width: auto; max-height: none; margin: 12px 0; box-shadow: none; }
}
