.plagscanx-app-container .psx-new-scan-nav {
    margin: 10px 16px 10px;
    justify-content: center;
    gap: 4px;
}
@media (min-width: 901px) {
    .plagscanx-sidebar-collapsed .psx-new-scan-nav {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        margin: 10px auto 10px;
        padding: 0;
        justify-content: center;
        gap: 0;
        border-radius: 50% !important;
    }

    .plagscanx-sidebar-collapsed .psx-new-scan-nav span { display: none; }
}
#view-new_scan { min-height: 0; overflow: hidden; }
.psx-new-scan { --psx-new-line: var(--psx-border, #e4e4e7); min-width: 0; min-height: 0; display: flex; flex: 1; flex-direction: column; background: var(--psx-card); }
.plagscanx-app-header.is-new-scan-header { display: grid !important; grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 24px; }
.plagscanx-app-header.is-new-scan-header .header-left { grid-column: 1; grid-row: 1; min-width: 0; margin-inline-end: 0; }
.plagscanx-app-header.is-new-scan-header .psx-new-includes { grid-column: 2; grid-row: 1; }
.plagscanx-app-header.is-new-scan-header .psx-new-actions { grid-column: 3; grid-row: 1; }
.plagscanx-app-header.is-new-scan-header .psx-app-profile { grid-column: 4; grid-row: 1; }
.psx-new-header { display: contents; }
.psx-new-includes { min-width: 0; display: flex; align-items: center; gap: 10px; margin-inline-start: 26px; color: var(--psx-text-muted); font-size: 12px; line-height: 1.5; white-space: nowrap; }
.psx-new-includes span { display: inline-flex; align-items: center; gap: 6px; }
.psx-new-includes .psx-icon { width: 14px; height: 14px; color: var(--psx-primary); stroke-width: 2.25; }
.psx-new-includes .psx-new-includes-separator { color: var(--psx-border-strong, #a1a1aa); }
.psx-new-private { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 14px; cursor: pointer; }
.psx-new-scan input[type=checkbox], .psx-new-scan input[type=radio], .psx-new-dialog input[type=radio] { accent-color: var(--psx-primary); flex: 0 0 auto; width: 16px; height: 16px; margin: 0; }
.psx-new-actions { display: flex; align-items: center; justify-self: end; gap: 12px; min-width: 0; }
#psx-new-share, #psx-new-download { min-height: 32px; white-space: nowrap; }
@media (min-width: 901px) {
    .plagscanx-app-header.is-new-scan-header { grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto auto auto; column-gap: 12px; }
    .plagscanx-app-header.is-new-scan-header .psx-dashboard-header-actions { grid-column: 4; grid-row: 1; }
    .plagscanx-app-header.is-new-scan-header .psx-app-profile { grid-column: 5; }
    .plagscanx-app-header.is-new-scan-header .psx-new-includes { margin-inline-start: 0; }
}
@media (min-width: 901px) and (max-width: 1350px) {
    .plagscanx-app-header.is-new-scan-header { grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-rows: 28px 18px; align-content: center; row-gap: 0; }
    .plagscanx-app-header.is-new-scan-header .psx-new-includes { grid-column: 1; grid-row: 2; gap: 6px; }
    .plagscanx-app-header.is-new-scan-header .psx-new-actions { grid-column: 2; grid-row: 1 / 3; }
    .plagscanx-app-header.is-new-scan-header .psx-dashboard-header-actions { grid-column: 3; grid-row: 1 / 3; }
    .plagscanx-app-header.is-new-scan-header .psx-app-profile { grid-column: 4; grid-row: 1 / 3; }
    .plagscanx-app-header.is-new-scan-header .psx-new-actions .btn-text { display: none; }
    .plagscanx-app-header.is-new-scan-header .psx-report-share,
    .plagscanx-app-header.is-new-scan-header .psx-report-download { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0; }
}
.psx-new-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr); flex: 1; min-height: 0; }
#view-new_scan .psx-new-document { min-width: 0; min-height: 0; padding: 0; margin: 0; overflow: hidden; }
#psx-new-text, #psx-new-highlights { display: block; margin: 0; box-shadow: none; overflow-wrap: anywhere; }
#psx-new-submit-hint[data-tooltip]::after { left: auto; right: 0; max-width: min(260px, calc(100vw - 32px)); }
#psx-new-submit-hint[data-tooltip]::before { left: auto; right: 18px; }
#psx-new-words { font-variant-numeric: tabular-nums; }
#psx-new-message, #psx-new-file-name { margin: 0; padding: 10px 16px; font-size: 13px; overflow-wrap: anywhere; }
#psx-new-message:empty { display: none; }
#psx-new-message.is-error { color: #b91c1c; }
.psx-new-results { min-width: 0; min-height: 0; overflow-y: auto; padding: 0 24px 24px; border-left: 1px solid var(--psx-new-line); background: var(--psx-sidebar); }
#psx-new-tabs { display: flex; margin-bottom: 24px; border-bottom: 1px solid var(--psx-new-line); gap: 16px; }
#psx-new-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; border-radius: 0; padding: 16px 0 12px; font: inherit; font-size: 13px; color: var(--psx-text-muted); flex: 1; min-width: 0; }
#psx-new-tabs button[aria-selected=true] { border-bottom-color: var(--psx-primary); color: var(--psx-text); font-weight: 500; }
#psx-new-tabs small { display: block; font-size: 12px; font-weight: 400; margin-top: 4px; }
.psx-new-result-state { color: var(--psx-text-muted); font-size: 14px; line-height: 1.6; padding: 36px 0; text-align: center; }
.psx-new-untabbed { padding-top: 24px; }
.psx-new-indeterminate .progress-fill { width: 40%; animation: psx-new-progress 1.6s ease-in-out infinite; }
@keyframes psx-new-progress { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .psx-new-indeterminate .progress-fill { animation: none; transform: none; } }
.psx-new-dialog { width: min(600px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 28px; border: 1px solid var(--psx-border, #e4e4e7); border-radius: 8px; color: var(--psx-text); background: #fff; font: inherit; }
.psx-new-dialog::backdrop { background: rgb(24 24 27 / 45%); }
.psx-new-dialog h2 { margin: 0 0 20px; font-size: 20px; font-weight: 600; }
.psx-new-dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.psx-comprehensive-dialog { position: relative; width: min(620px, calc(100% - 32px)); overflow: visible; }
.psx-comprehensive-close { position: absolute; inset-block-start: 16px; inset-inline-end: 16px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--psx-text-muted); cursor: pointer; }
.psx-comprehensive-close:hover { background: var(--psx-hover, #f4f4f5); color: var(--psx-text); }
.psx-comprehensive-close .psx-icon { width: 18px; height: 18px; }
.psx-comprehensive-dialog-heading { min-width: 0; padding-inline-end: 34px; }
.psx-comprehensive-dialog-heading h2 { margin-bottom: 6px; }
.psx-comprehensive-dialog-heading p { max-width: 52ch; margin: 0; color: var(--psx-text-muted); font-size: 14px; line-height: 1.55; }
.psx-comprehensive-status-list { margin-top: 24px; border-block: 1px solid var(--psx-border, #e4e4e7); }
.psx-comprehensive-status { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 72px; padding: 12px 2px; }
.psx-comprehensive-status + .psx-comprehensive-status { border-top: 1px solid var(--psx-border, #e4e4e7); }
.psx-comprehensive-status-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.psx-comprehensive-status-copy strong { font-size: 14px; font-weight: 600; }
.psx-comprehensive-status-copy small { color: var(--psx-text-muted); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.psx-comprehensive-status-badge,
.psx-comprehensive-status-badge:disabled {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 10px;
    border: 0;
    border-radius: 999px;
    background: var(--psx-hover, #f4f4f5);
    color: var(--psx-text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 1;
    cursor: default;
}
.psx-comprehensive-status-badge .psx-icon { width: 15px; height: 15px; flex: 0 0 15px; }
.psx-comprehensive-status.is-ready .psx-comprehensive-status-badge .psx-icon { color: var(--psx-success, #15803d); }
.psx-comprehensive-status.is-unavailable .psx-comprehensive-status-badge .psx-icon { color: var(--psx-warning, #b45309); }
.psx-comprehensive-reset { margin: 14px 0 0; color: var(--psx-text-muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.psx-comprehensive-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.psx-comprehensive-dialog-actions .psx-comprehensive-action { min-height: 40px; }
.psx-comprehensive-action-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--psx-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.psx-comprehensive-action-ghost:hover { background: var(--psx-primary-soft, #eef2ff); }
.psx-new-header[hidden], .psx-new-scan [hidden], .psx-new-dialog [hidden] { display: none !important; }
.psx-new-header :focus-visible, .psx-new-scan :focus-visible, .psx-new-dialog :focus-visible { outline: 2px solid var(--psx-primary); outline-offset: 3px; }
@media (max-width: 1350px) {
    .psx-new-includes { margin-inline-start: 0; }
    .psx-new-actions { gap: 6px; }
    .psx-new-actions .btn-text { display: none; }
    #psx-new-share, #psx-new-download { width: 34px; min-width: 34px; height: 34px; min-height: 34px; padding: 0 !important; justify-content: center; }
}
@media (max-width: 1200px) and (min-width: 901px) {
    .psx-new-workspace { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 900px) {
    #view-new_scan { overflow-y: auto; }
    .psx-new-scan { flex: 0 0 auto; }
    .psx-new-workspace { display: flex; flex-direction: column; }
    #psx-new-text, #psx-new-highlights { flex: 0 0 auto; min-height: 380px; max-height: 60dvh; }
    .psx-new-results { border-left: 0; border-top: 1px solid var(--psx-new-line); padding-inline: 16px; }
}
@media (max-width: 640px) {
    .plagscanx-app-header.is-new-scan-header { grid-template-columns: minmax(0, 1fr) auto; height: auto; min-height: 88px; flex-basis: auto; padding-block: 8px; row-gap: 8px; }
    .plagscanx-app-header.is-new-scan-header .psx-new-includes { grid-column: 1 / -1; grid-row: 2; }
    .plagscanx-app-header.is-new-scan-header .psx-new-actions { grid-column: 2; grid-row: 1; }
    #view-new_scan .toolbar-left .toolbar-item:not(.counter-item) { min-width: 0; flex: 1 1 0; }
    .psx-comprehensive-dialog { padding: 22px 18px; }
    .psx-comprehensive-status { grid-template-columns: minmax(0, 1fr); }
    .psx-comprehensive-status-badge { justify-self: start; }
    .psx-comprehensive-dialog-actions { align-items: stretch; flex-direction: column; }
    .psx-comprehensive-dialog-actions button { width: 100%; justify-content: center; }
}
@media (max-width: 440px) {
    .plagscanx-app-header.is-new-scan-header .header-left { grid-column: 1 / -1; grid-row: 1; }
    .plagscanx-app-header.is-new-scan-header .psx-new-actions { grid-column: 1 / -1; grid-row: 3; }
    .plagscanx-app-header.is-new-scan-header .psx-new-includes { gap: 8px; white-space: normal; }
    .psx-new-dialog { padding: 20px; }
}
@media print {
    .psx-new-print { padding: 24px; }
    .psx-new-print section { break-before: page; }
    .psx-new-print section:first-of-type { break-before: auto; }
    .psx-new-print button:not(.source-select) { display: none !important; }
    .psx-new-print .psx-new-results { border: 0; background: #fff; }
    .psx-new-print .psx-print-text { white-space: pre-wrap; line-height: 1.7; margin-top: 24px; }
}
