.notes-problem-dialog {
    width: min(980px, calc(100vw - 32px));
    height: min(var(--problem-height, 600px), calc(100dvh - 32px));
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 12px;
    color: #20242b;
    background: #fff;
    overflow: hidden;
}
.notes-problem-dialog[open] { display: flex; flex-direction: column; }
.notes-problem-dialog[data-source="pdf"] { width: min(1180px, calc(100vw - 32px)); height: min(900px, calc(100dvh - 32px)); }
.notes-problem-dialog::backdrop { background: rgb(12 22 17 / 45%); }
.notes-problem-dialog__close { position: absolute; top: 12px; right: 10px; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; padding: 6px; border: 0; border-radius: 6px; color: #20242b; background: #fff; cursor: pointer; }
.notes-problem-dialog__close:hover { background: #edf3f8; }
.notes-problem-dialog__close:focus-visible { outline: 2px solid #397bb5; outline-offset: -2px; }
.notes-problem-dialog__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.notes-problem-dialog__body { position: relative; flex: 1; min-height: 0; overflow: auto; }
.notes-problem-dialog__body:has(iframe) > .notes-problem-dialog__status { position: absolute; inset: 0; z-index: 1; margin: 0; padding: 24px 48px 24px 24px; background: #fff; }
.notes-problem-dialog__status { margin: 24px; font-size: 14px; line-height: 1.6; }
.notes-problem-dialog__body > .notes-button { margin: 0 24px; }
.notes-problem-dialog__frame { display: block; width: 100%; height: 100%; border: 0; }
.notes-problem-dialog__frame[hidden] { display: none; }
/* The live Atlas card and Topicals reader retain their original styles and tools. */
html.problem-popup, .problem-popup body { height: 100%; overflow: auto; }
.problem-popup .app-shell { display: block; height: 100%; min-height: 0; padding: 0; }
.problem-popup .app-shell > :not(.main),
.problem-popup .topbar,
.problem-popup .landing-page,
.problem-popup .dashboard-rail,
.problem-popup .dashboard-header,
.problem-popup .dashboard-columns { display: none !important; }
.problem-popup .main,
.problem-popup #dashboardWorkspace,
.problem-popup .dashboard-inner { width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; }
.problem-popup #dashboardWorkspace { display: none !important; }
.problem-popup .app-shell > .main { display: block !important; }
.problem-popup .main::after { display: none !important; }
html.problem-popup body:has(#dashboardWorkspace.has-active-pane) .main > header.topbar { display: none !important; }
.problem-popup #practiceStudioWorkspace { width: 100% !important; min-width: 0; padding: 0; border: 0 !important; border-radius: 0; }
.problem-popup #practiceStudioMount { width: 100%; min-width: 0; }
.problem-popup .atlas-question-session > .topical-aurora-header,
.problem-popup .practice-studio__session-head { display: none !important; }
.problem-popup .atlas-question-session .practice-studio { width: 100%; margin: 0; padding: 0; }
.problem-popup .practice-card { margin: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.problem-popup .practice-card__header { padding-right: 30px; }
.problem-popup .practice-reference { margin-top: 20px; border-top: 1px solid var(--practice-line); padding-top: 16px; }
.problem-popup .practice-reference[hidden] { display: none; }
.problem-popup .practice-reference__header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.problem-popup .practice-reference__header h3 { margin: 0; font-size: 15px; font-weight: 600; }
.problem-popup #topicalWorkspace { height: 100%; min-height: 0; border: 0; border-radius: 0; }
.problem-popup #topicalWorkspace > .topical-aurora-header,
.problem-popup #topicalTopicStage,
.problem-popup #topicalSubtopicStage,
.problem-popup #topicalQuestionBrowser,
.problem-popup .topical-reader-home-button,
.problem-popup .topical-question-nav { display: none !important; }
.problem-popup #topicalDetail { display: block; min-width: 0; }
.problem-popup #topicalQuestionView > .topical-view-header { padding-right: 48px; }
.problem-popup .topical-workspace.topical-question-open { grid-template-columns: minmax(0, 1fr); }
.problem-popup .topical-workspace.topical-assistant-open { grid-template-columns: minmax(0, 1fr) var(--topical-assistant-width, 420px); }
html.problem-popup .app-shell:has(#topicalQuestionView:not([hidden])) #topicalQuestionView .topical-answer-section:has(#topicalFeedback:not([hidden])) { display: block !important; flex: 0 0 auto; max-height: 28vh; margin: 0; padding: 10px 16px; overflow: auto; border-top: 1px solid var(--border); }
.problem-popup .topical-answer-section .topical-answer-heading { display: none; }
.problem-popup #topicalFeedback { margin: 0; }
.problem-popup [data-typesafe-testing-notice] { display: none; }
@media (max-width: 820px) {
    .notes-problem-dialog { width: calc(100vw - 12px); height: min(var(--problem-height, 600px), calc(100dvh - 12px)); }
    .notes-problem-dialog[data-source="pdf"] { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
    .problem-popup .topical-workspace.topical-assistant-open { grid-template-columns: minmax(0, 1fr); }
    .problem-popup #topicalWorkspace .topical-view-actions .topical-document-switcher { flex: 0 0 auto; height: auto; min-height: 34px; }
}
