/* Compare source intent belongs to the page workspace, not the shared logo
 * primitive consumed by Journal. */
/* Exact public comparison context. This augments the existing Compare workspace
   without changing the replay result or the surrounding product hierarchy. */
.pf-public-compare-intent {
    display: grid;
    gap: 14px;
    padding: 15px;
    border: 1px solid rgba(77, 171, 154, 0.22);
    border-radius: 10px;
    background: rgba(77, 171, 154, 0.055);
}

.pf-public-compare-intent[hidden] {
    display: none;
}

.pf-public-compare-intent > div:first-child {
    display: grid;
    gap: 5px;
}

.pf-public-compare-intent strong {
    color: var(--pf-text-primary, #f5f7f6);
    font-size: 14px;
}

.pf-public-compare-intent small {
    color: var(--pf-text-support, #909a98);
    line-height: 1.45;
}

.pf-public-compare-intent-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pf-public-compare-intent-actions button {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--pf-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--pf-text-primary, #f5f7f6);
    text-align: left;
    cursor: pointer;
}

.pf-public-compare-intent-actions button:hover,
.pf-public-compare-intent-actions button:focus-visible,
.pf-public-compare-intent-actions button.is-active {
    border-color: rgba(77, 171, 154, 0.5);
    background: rgba(77, 171, 154, 0.1);
    outline: none;
}

.pf-public-compare-intent-actions span,
.pf-public-compare-intent-actions small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-public-compare-intent-actions span {
    font-weight: 750;
    white-space: nowrap;
}

.pf-public-compare-intent-actions small {
    margin-top: 3px;
    white-space: nowrap;
}

.pf-replay-feedback {
    margin: 0;
    padding-left: 10px;
    border-left: 1px solid var(--app-border-strong, rgba(255, 255, 255, 0.14));
    color: var(--text-secondary);
    font-size: var(--pf-fs-chip);
    line-height: 1.5;
}

.pf-replay-feedback[data-state="warning"] {
    border-left-color: rgba(217, 180, 92, 0.54);
    color: #d9b45c;
}

.pf-replay-feedback[data-state="error"] {
    border-left-color: rgba(241, 126, 126, 0.58);
    color: #f17e7e;
}

@media (max-width: 520px) {
    .pf-public-compare-intent-actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pf-public-compare-intent-actions button {
        transition: none !important;
    }
}

/* Flagship comparison composition
 *
 * This is the single active layout contract for Compare Rules. It keeps the
 * existing TSB terminal-dark surfaces and reserves teal/red/amber for actions
 * and semantic state instead of tinting whole value panels. */
body.pf-page .pf-intro-card.app-page-command-content {
    padding: 12px 0 0 !important;
}

body.pf-page .pf-intro-band.app-page-command-band::after {
    display: none !important;
}

/* Prop Tracker already has one contextual demo CTA in the page banner. The
 * global floating CTA obscures charts and disclosure controls here. */
body.pf-page .demo-float-cta {
    display: none !important;
}

/* My Account type roles. Semantic heading levels describe document structure;
 * these two visual roles keep every account module on the same product scale. */
body.pf-page .pf-account-title-row h2 {
    overflow: hidden;
    margin: 0;
    color: var(--text-primary);
    font-size: var(--pf-fs-title);
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-account-next-action-copy h3,
body.pf-page .pf-account-section-head h3,
body.pf-page .pf-account-card-head h3,
body.pf-page .pf-account-activity-head h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--pf-fs-card-title);
    font-weight: 650;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

body.pf-page .pf-account-section-kicker {
    font-size: var(--pf-fs-kicker);
}

body.pf-page .pf-setup-disclosure {
    border: 1px solid var(--app-border-soft);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-section);
    overflow: hidden;
}

body.pf-page .pf-setup-command {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px 24px;
    min-height: 112px;
    padding: 18px 20px;
}

body.pf-page .pf-setup-command-title {
    min-width: 0;
}

body.pf-page .pf-setup-command-title > .pf-section-kicker {
    display: block;
    margin-bottom: 6px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.pf-page .pf-setup-command-title h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 650;
    letter-spacing: -.025em;
    line-height: 1.12;
}

body.pf-page .pf-setup-command-title h2 > span {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-setup-command-title h2 > svg,
body.pf-page .pf-setup-command-title h2 > i {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: var(--accent-secondary);
}

body.pf-page .pf-setup-command-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

body.pf-page .pf-setup-primary-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

body.pf-page .pf-setup-action-divider {
    width: 1px;
    height: 24px;
    flex: 0 0 1px;
    margin-inline: 2px;
    background: var(--app-divider-muted);
}

body.pf-page .pf-setup-command-actions .app-action-btn {
    min-height: 44px;
    padding-inline: 14px;
    border-radius: var(--app-radius-control);
    font-size: var(--pf-fs-body-sm);
}

body.pf-page .pf-setup-command-actions .pf-affiliate-link {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
    border-color: var(--app-action-primary-border);
    background: var(--app-surface-control);
    color: var(--accent-secondary);
    box-shadow: none;
    white-space: nowrap;
}

body.pf-page .pf-setup-command-actions .pf-affiliate-link:hover {
    border-color: var(--app-action-primary-border-hover);
    background: var(--app-surface-card-hover);
    color: var(--text-primary);
    box-shadow: none;
}

body.pf-page .pf-setup-command-actions .pf-run-btn.app-action-btn-primary {
    border-color: color-mix(in srgb, var(--accent-secondary) 72%, transparent);
    background: var(--accent-secondary);
    color: #061f1b;
    font-weight: 700;
    box-shadow: none;
}

body.pf-page .pf-setup-command-actions .pf-run-btn.app-action-btn-primary:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent);
    color: #031310;
    box-shadow: var(--app-action-primary-ring);
}

body.pf-page .pf-setup-command-actions .pf-run-btn:focus-visible,
body.pf-page .pf-setup-toggle:focus-visible {
    outline: 1px solid var(--app-action-primary-border-hover);
    outline-offset: 2px;
}

body.pf-page .pf-setup-toggle-chevron {
    transition: transform var(--duration-normal) var(--ease-out);
}

body.pf-page .pf-setup-disclosure[data-expanded="false"] .pf-setup-toggle-chevron {
    transform: rotate(180deg);
}

body.pf-page .pf-setup-command-facts {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 0;
    padding-top: 14px;
    border-top: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-setup-command-fact {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 28px;
    padding: 0 18px;
    color: var(--text-secondary);
}

body.pf-page .pf-setup-command-fact:first-child {
    padding-left: 0;
}

body.pf-page .pf-setup-command-fact + .pf-setup-command-fact {
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-setup-command-fact > svg,
body.pf-page .pf-setup-command-fact > i {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    color: var(--text-tertiary);
}

body.pf-page .pf-setup-command-fact > strong,
body.pf-page .pf-setup-command-fact > span {
    min-width: 0;
}

body.pf-page .pf-setup-command-fact > strong,
body.pf-page .pf-setup-command-fact > span > strong {
    display: flex;
    gap: 6px;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-setup-command-fact > span > small {
    display: block;
    margin-bottom: 2px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    line-height: 1.2;
}

body.pf-page .pf-setup-command-fact--status[data-state="pass"] > svg,
body.pf-page .pf-setup-command-fact--status[data-state="pass"] > span > strong {
    color: var(--accent-secondary);
}

body.pf-page .pf-setup-command-fact--status[data-state="breach"] > svg,
body.pf-page .pf-setup-command-fact--status[data-state="breach"] > span > strong {
    color: var(--red-light);
}

body.pf-page .pf-setup-command-fact--status[data-state="tracking"] > svg,
body.pf-page .pf-setup-command-fact--status[data-state="tracking"] > span > strong {
    color: var(--warn-light);
}

body.pf-page .pf-setup-disclosure[data-expanded="true"] .pf-setup-command-fact--selection {
    display: none;
}

body.pf-page .pf-setup-disclosure[data-expanded="true"] .pf-setup-command-facts {
    display: flex;
}

body.pf-page .pf-setup-disclosure[data-expanded="true"] .pf-setup-command-fact--status {
    padding-left: 0;
    border-left: 0;
}

body.pf-page .pf-setup-body {
    border-top: 1px solid var(--app-border-soft);
}

body.pf-page .pf-setup-body[hidden] {
    display: none;
}

body.pf-page .pf-setup-body > .pf-public-compare-intent {
    margin: 20px 20px 0;
}

body.pf-page .pf-setup-columns {
    display: grid;
    grid-template-columns: minmax(220px, .82fr) minmax(330px, 1.08fr) minmax(360px, 1.1fr);
    align-items: stretch;
    padding: 24px 20px;
}

body.pf-page .pf-setup-column {
    display: grid;
    align-content: start;
    gap: 16px;
    min-width: 0;
    padding: 0 28px;
}

body.pf-page .pf-setup-column:first-child {
    padding-left: 0;
}

body.pf-page .pf-setup-column:last-child {
    padding-right: 0;
}

body.pf-page .pf-setup-column + .pf-setup-column {
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-setup-column h3,
body.pf-page .pf-rules-in-force h3 {
    margin: 0 0 2px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.pf-page .pf-setup-column h3 > span {
    color: var(--text-secondary);
}

body.pf-page .pf-setup-column .pf-field,
body.pf-page .pf-setup-column .pf-choice-group {
    min-width: 0;
}

body.pf-page .pf-setup-column .pf-field label,
body.pf-page .pf-setup-column .pf-choice-label {
    margin-bottom: 7px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .02em;
    line-height: 1.2;
    text-transform: none;
}

body.pf-page .pf-setup-column .pf-field select,
body.pf-page .pf-setup-column .pf-firm-select-trigger {
    height: 48px;
}

body.pf-page .pf-setup-column .pf-select-shell--replay-source select,
body.pf-page .pf-setup-column .pf-select-shell--currency select {
    width: 100%;
    padding-left: 44px;
}

body.pf-page .pf-setup-column .pf-select-logo--source,
body.pf-page .pf-setup-column .pf-select-logo--currency {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text-secondary);
    transform: translateY(-50%);
    pointer-events: none;
}

body.pf-page .pf-setup-column .pf-select-logo--source svg,
body.pf-page .pf-setup-column .pf-select-logo--source i,
body.pf-page .pf-setup-column .pf-select-logo--currency svg,
body.pf-page .pf-setup-column .pf-select-logo--currency i {
    width: 17px;
    height: 17px;
    stroke-width: 1.8;
}

body.pf-page .pf-setup-column .pf-region-list,
body.pf-page .pf-setup-column .pf-program-list,
body.pf-page .pf-setup-column .pf-phase-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

body.pf-page .pf-setup-column .pf-region-item,
body.pf-page .pf-setup-column .pf-program-item,
body.pf-page .pf-setup-column .pf-phase-item {
    min-height: 34px;
    padding: 7px 10px;
}

body.pf-page .pf-setup-column .pf-program-item--identified {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding-left: 8px;
}

body.pf-page .pf-program-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    border-radius: 6px;
    color: var(--text-tertiary);
    background: rgba(var(--app-white-rgb), .05);
}

body.pf-page .pf-program-icon svg,
body.pf-page .pf-program-icon i {
    width: 14px;
    height: 14px;
    stroke-width: 2.1;
}

body.pf-page .pf-program-item--pro .pf-program-icon {
    color: #60a5fa;
    background: rgba(59, 130, 246, .12);
}

body.pf-page .pf-program-item--growth .pf-program-icon {
    color: #5fd47b;
    background: rgba(34, 197, 94, .11);
}

body.pf-page .pf-program-item--pro.active {
    border-color: rgba(59, 130, 246, .42);
    background: rgba(59, 130, 246, .10);
    color: #bfdbfe;
}

body.pf-page .pf-program-item--growth.active {
    border-color: rgba(34, 197, 94, .38);
    background: rgba(34, 197, 94, .09);
    color: #bbf7d0;
}

html.light body.pf-page .pf-program-item--pro.active {
    border-color: rgba(37, 99, 235, .35);
    background: rgba(59, 130, 246, .10);
    color: #1d4ed8;
}

html.light body.pf-page .pf-program-item--growth.active {
    border-color: rgba(22, 163, 74, .32);
    background: rgba(34, 197, 94, .09);
    color: #15803d;
}

body.pf-page .pf-setup-column .pf-size-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

body.pf-page .pf-setup-column .pf-size-chip {
    min-height: 54px;
    padding: 9px 10px;
}

body.pf-page .pf-setup-column .pf-size-chip:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

body.pf-page .pf-replay-source-meta {
    display: block;
    margin-top: 7px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-meta);
    line-height: 1.35;
}

body.pf-page .pf-setup-source-note,
body.pf-page .pf-setup-reviewed {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--app-divider-muted);
    color: var(--text-tertiary);
    font-size: var(--pf-fs-meta);
    line-height: 1.45;
}

body.pf-page .pf-setup-source-note > svg,
body.pf-page .pf-setup-reviewed > svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    margin-top: 1px;
    color: var(--accent-secondary);
}

body.pf-page .pf-setup-reviewed > span {
    display: grid;
    gap: 3px;
}

body.pf-page .pf-setup-reviewed small {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    line-height: 1.2;
}

body.pf-page .pf-setup-reviewed strong {
    color: var(--text-secondary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 600;
    line-height: 1.3;
}

body.pf-page .pf-rules-in-force {
    padding: 18px 20px 20px;
    border-top: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-rules-in-force-grid,
body.pf-page .pf-firm-terms-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin-top: 14px;
}

body.pf-page .pf-rules-in-force-grid > span,
body.pf-page .pf-firm-terms-grid > span {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 0 24px;
}

body.pf-page .pf-rules-in-force-grid > span:first-child,
body.pf-page .pf-firm-terms-grid > span:first-child {
    padding-left: 0;
}

body.pf-page .pf-rules-in-force-grid > span:last-child,
body.pf-page .pf-firm-terms-grid > span:last-child {
    padding-right: 0;
}

body.pf-page .pf-rules-in-force-grid > span + span,
body.pf-page .pf-firm-terms-grid > span + span {
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-rules-in-force-grid small,
body.pf-page .pf-firm-terms-grid small,
body.pf-page .pf-today-guard-grid small {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .02em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.pf-page .pf-rules-in-force-grid strong,
body.pf-page .pf-firm-terms-grid strong,
body.pf-page .pf-today-guard-grid strong {
    overflow: hidden;
    color: var(--text-primary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-body-sm);
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-setup-body > .pf-manual-rules-notice {
    margin: 0 20px 16px;
}

body.pf-page .pf-setup-body > .pf-today-guard {
    margin: 0;
    padding: 18px 20px 20px;
    overflow: visible;
    border: 0;
    border-top: 1px solid var(--app-divider-muted);
    border-radius: 0;
    background: transparent;
}

body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-head {
    padding: 0 0 14px;
    border-bottom: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-head > span,
body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-head > strong {
    font-size: var(--pf-fs-kicker);
}

body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 16px 0 0;
}

body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-grid > span {
    padding: 0 24px;
    border-color: var(--app-divider-muted);
}

body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-grid > span:first-child {
    padding-left: 0;
}

body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-grid > span:last-child {
    padding-right: 0;
}

body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-pending {
    min-height: 48px;
    padding: 14px 0 0;
    font-size: var(--pf-fs-body-sm);
}

body.pf-page .pf-setup-body > .pf-today-guard > p {
    padding: 12px 0 0;
    border-top: 0;
    font-size: var(--pf-fs-meta);
}

body.pf-page .pf-firm-terms {
    border-top: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-firm-terms-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
    padding: 8px 20px;
    border-bottom: 1px solid var(--app-divider-muted);
    color: var(--text-secondary);
}

body.pf-page .pf-firm-terms-head > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--pf-fs-body-sm);
    font-weight: 650;
}

body.pf-page .pf-firm-terms-head > span svg,
body.pf-page .pf-firm-terms-head > span i {
    width: 16px;
    height: 16px;
}

body.pf-page .pf-firm-terms-body {
    padding: 18px 20px 20px;
}

body.pf-page .pf-firm-terms-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
}

body.pf-page .pf-platform-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

body.pf-page .pf-platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 2px 4px 2px 0;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--pf-fs-meta);
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

body.pf-page .pf-platform-icon {
    --tsb-source-mark-size: 20px;
    --tsb-source-logo-size: 15px;
}

body.pf-page .pf-platform-icon--fallback {
    background: var(--app-surface-card-hover);
    color: var(--text-tertiary);
    font-size: 9px;
    font-weight: 750;
}

body.pf-page .pf-platform-empty {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-meta);
    font-weight: 500;
}

body.pf-page .pf-setup-body > .pf-replay-feedback {
    margin: 0;
    padding: 12px 20px;
    border-top: 1px solid var(--app-divider-muted);
}

@media (max-width: 1180px) {
    body.pf-page .pf-setup-columns {
        grid-template-columns: minmax(260px, .85fr) minmax(360px, 1.15fr);
    }

    body.pf-page .pf-setup-column--simulation {
        grid-column: 1 / -1;
        grid-template-columns: minmax(0, 1fr);
        margin-top: 22px;
        padding: 22px 0 0;
        border-top: 1px solid var(--app-divider-muted);
        border-left: 0 !important;
    }

    body.pf-page .pf-setup-column--simulation > .pf-field {
        width: min(100%, 320px);
    }

    body.pf-page .pf-setup-column--simulation .pf-size-list {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    body.pf-page .pf-setup-column--simulation .pf-size-chip:last-child:nth-child(odd) {
        grid-column: auto;
    }
}

@media (max-width: 900px) {
    body.pf-page .pf-setup-command {
        grid-template-columns: minmax(0, 1fr);
    }

    body.pf-page .pf-setup-command-actions {
        grid-row: 3;
        justify-content: flex-start;
    }

    body.pf-page .pf-setup-command-facts {
        grid-row: 2;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    body.pf-page .pf-setup-command-fact,
    body.pf-page .pf-setup-command-fact:first-child {
        padding: 0;
    }

    body.pf-page .pf-setup-command-fact + .pf-setup-command-fact {
        padding-top: 10px;
        border-top: 1px solid var(--app-divider-muted);
        border-left: 0;
    }

    body.pf-page .pf-setup-disclosure[data-expanded="true"] .pf-setup-command-facts {
        display: block;
    }

    body.pf-page .pf-setup-disclosure[data-expanded="true"] .pf-setup-command-fact--status {
        padding-top: 0;
        border-top: 0;
    }

    body.pf-page .pf-setup-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    body.pf-page .pf-setup-column,
    body.pf-page .pf-setup-column:first-child,
    body.pf-page .pf-setup-column:last-child,
    body.pf-page .pf-setup-column--simulation {
        grid-column: auto;
        grid-template-columns: minmax(0, 1fr);
        margin: 0;
        padding: 22px 0;
        border-top: 1px solid var(--app-divider-muted);
        border-left: 0;
    }

    body.pf-page .pf-setup-column + .pf-setup-column {
        border-left: 0;
    }

    body.pf-page .pf-setup-column:first-child {
        padding-top: 0;
        border-top: 0;
    }

    body.pf-page .pf-setup-column:last-child {
        padding-bottom: 0;
    }

    body.pf-page .pf-setup-column--simulation > .pf-field {
        width: 100%;
    }

    body.pf-page .pf-setup-column--simulation .pf-size-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.pf-page .pf-setup-column--simulation .pf-size-chip:last-child:nth-child(odd) {
        grid-column: auto;
    }

    body.pf-page .pf-rules-in-force-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 18px;
    }

    body.pf-page .pf-rules-in-force-grid > span,
    body.pf-page .pf-rules-in-force-grid > span:first-child,
    body.pf-page .pf-rules-in-force-grid > span:last-child {
        padding: 0 18px;
    }

    body.pf-page .pf-rules-in-force-grid > span:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

    body.pf-page .pf-rules-in-force-grid > span:nth-child(even) {
        padding-right: 0;
    }

    body.pf-page .pf-rules-in-force-grid > span:nth-child(n + 3) {
        padding-top: 18px;
        border-top: 1px solid var(--app-divider-muted);
    }

}

@media (max-width: 767px) {
    body.pf-page .pf-setup-command {
        min-height: 0;
        gap: 14px;
        padding: 16px 14px;
    }

    body.pf-page .pf-setup-command-title h2 {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        font-size: 20px;
    }

    body.pf-page .pf-setup-command-title h2 > svg,
    body.pf-page .pf-setup-command-title h2 > i {
        display: none;
    }

    body.pf-page .pf-setup-command-title h2 > span {
        white-space: normal;
    }

    body.pf-page .pf-setup-command-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        width: 100%;
    }

    body.pf-page .pf-setup-primary-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 1px max-content;
        width: 100%;
    }

    body.pf-page .pf-setup-command-actions .app-action-btn {
        min-width: 0;
        justify-content: center;
    }

    body.pf-page .pf-setup-toggle > span {
        display: none;
    }

    body.pf-page .pf-setup-command-actions .pf-setup-toggle {
        width: 44px;
        padding-inline: 0;
        gap: 4px;
    }

    body.pf-page .pf-setup-body > .pf-public-compare-intent {
        margin: 14px 14px 0;
    }

    body.pf-page .pf-setup-columns {
        padding: 20px 14px;
    }

    body.pf-page .pf-setup-column .pf-size-list,
    body.pf-page .pf-setup-column--simulation .pf-size-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.pf-page .pf-setup-column .pf-size-chip:last-child:nth-child(odd),
    body.pf-page .pf-setup-column--simulation .pf-size-chip:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    body.pf-page .pf-rules-in-force,
    body.pf-page .pf-setup-body > .pf-today-guard {
        padding-right: 14px;
        padding-left: 14px;
    }

    body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 0;
    }

    body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-grid > span,
    body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-grid > span:first-child,
    body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-grid > span:last-child {
        padding: 0 12px;
    }

    body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-grid > span:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

    body.pf-page .pf-setup-body > .pf-today-guard .pf-today-guard-grid > span:nth-child(even) {
        padding-right: 0;
    }

    body.pf-page .pf-firm-terms-head {
        padding-right: 14px;
        padding-left: 14px;
    }

    body.pf-page .pf-firm-terms-body {
        padding: 16px 14px 18px;
    }

    body.pf-page .pf-firm-terms-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 16px;
    }

    body.pf-page .pf-firm-terms-grid > span,
    body.pf-page .pf-firm-terms-grid > span:first-child,
    body.pf-page .pf-firm-terms-grid > span:last-child {
        padding: 0 12px;
    }

    body.pf-page .pf-firm-terms-grid > span:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

    body.pf-page .pf-firm-terms-grid > span:nth-child(even) {
        padding-right: 0;
    }

    body.pf-page .pf-firm-terms-grid > span:nth-child(n + 3) {
        padding-top: 16px;
        border-top: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-setup-body > .pf-manual-rules-notice {
        margin-right: 14px;
        margin-left: 14px;
    }

    body.pf-page .pf-setup-body > .pf-replay-feedback {
        padding-right: 14px;
        padding-left: 14px;
    }
}

@media (max-width: 360px) {
    body.pf-page .pf-setup-primary-actions .pf-run-btn > svg,
    body.pf-page .pf-setup-primary-actions .pf-run-btn > i,
    body.pf-page .pf-setup-primary-actions .pf-affiliate-link > svg,
    body.pf-page .pf-setup-primary-actions .pf-affiliate-link > i {
        display: none;
    }

    body.pf-page .pf-setup-command-actions .pf-run-btn,
    body.pf-page .pf-setup-command-actions .pf-affiliate-link {
        padding-inline: 10px;
    }
}

@media (max-width: 330px) {
    body.pf-page .pf-setup-command-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    body.pf-page .pf-setup-command-actions .pf-setup-toggle {
        justify-self: end;
    }
}

body.pf-page #pfResultsWrap {
    --pf-report-section-gap: 20px;
    margin-top: var(--pf-report-section-gap);
}

body.pf-page .pf-results-shell.app-section-shell {
    display: grid;
    gap: var(--pf-report-section-gap);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

body.pf-page .pf-results-shell.app-section-shell::before {
    content: none;
}

body.pf-page .pf-results-shell > .pf-report-section,
body.pf-page .pf-results-shell > .pf-report-section + .pf-report-section {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.pf-page .pf-report-layout--primary {
    display: grid;
    grid-template-columns: minmax(0, 1.62fr) minmax(340px, .88fr);
    gap: 12px;
    align-items: start;
}

body.pf-page .pf-report-layout--primary > .pf-report-stack {
    display: contents;
}

body.pf-page .pf-report-layout--primary .pf-report-block {
    min-width: 0;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--app-border-soft);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-card);
    box-shadow: none;
}

body.pf-page .pf-report-layout--primary .pf-verdict-card {
    display: grid;
    grid-template-columns: minmax(360px, 1.15fr) minmax(540px, .85fr);
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 0;
    background: var(--app-surface-section);
    overflow: hidden;
}

body.pf-page .pf-verdict-lead {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 0;
    padding: 15px 18px;
}

body.pf-page .pf-verdict-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--app-border-default);
    border-radius: 50%;
    background: var(--app-surface-control);
    color: var(--text-secondary);
    margin-top: 0;
}

body.pf-page .pf-verdict-mark svg,
body.pf-page .pf-verdict-mark i {
    width: 18px;
    height: 18px;
}

body.pf-page .pf-verdict-card[data-outcome="pass"] .pf-verdict-mark {
    border-color: var(--app-action-primary-border);
    background: var(--accent-subtle);
    color: var(--app-action-primary-color);
}

body.pf-page .pf-verdict-card[data-outcome="breach"] .pf-verdict-mark {
    border-color: var(--red-border);
    background: var(--red-bg);
    color: var(--red-light);
}

body.pf-page .pf-verdict-copy {
    display: grid;
    min-width: 0;
}

body.pf-page .pf-verdict-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 10px;
    min-width: 0;
}

body.pf-page .pf-verdict-card .pf-section-kicker {
    margin-bottom: 5px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
}

body.pf-page .pf-verdict-card .pf-shell-title {
    min-width: 0;
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(18px, 1.55vw, 22px);
    font-weight: 650;
    letter-spacing: -.025em;
    line-height: 1.14;
}

body.pf-page .pf-verdict-card p {
    max-width: 76ch;
    margin: 6px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.45;
}

body.pf-page .pf-verdict-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-width: 0;
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-verdict-kpi {
    display: grid;
    align-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 94px;
    padding: 13px 14px;
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-verdict-kpi:first-child {
    border-left: 0;
}

body.pf-page .pf-verdict-kpi > span {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .055em;
    text-transform: uppercase;
}

body.pf-page .pf-verdict-kpi > strong {
    overflow: hidden;
    color: var(--text-primary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 15px;
    font-weight: 550;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-verdict-kpi > small {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-verdict-state {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid var(--app-border-default);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: var(--pf-fs-chip);
    font-weight: 650;
    white-space: nowrap;
}

body.pf-page .pf-verdict-card[data-outcome="pass"] .pf-verdict-state {
    border-color: var(--app-action-primary-border);
    color: var(--app-action-primary-color);
}

body.pf-page .pf-verdict-card[data-outcome="breach"] .pf-verdict-state {
    border-color: var(--red-border);
    color: var(--red-light);
}

body.pf-page .pf-curve-meta-label,
body.pf-page .pf-forecast-strip .pf-stat-label {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .055em;
    text-transform: uppercase;
}

body.pf-page .pf-curve-meta-value,
body.pf-page .pf-forecast-strip .pf-stat-value {
    margin-top: 5px;
    color: var(--text-primary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-metric);
    font-weight: 500;
    line-height: 1.2;
}

body.pf-page .pf-forecast-strip .pf-stat-sub {
    margin-top: 4px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-chip);
    line-height: 1.35;
}

body.pf-page .pf-report-layout--primary .pf-curve-card {
    display: grid;
    grid-template-rows: auto 365px auto;
    grid-column: 1;
    grid-row: 2;
    padding: 18px;
    align-self: stretch;
}

body.pf-page .pf-report-layout--primary .pf-checks-card {
    display: flex;
    flex-direction: column;
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
}

body.pf-page .pf-report-layout--primary .pf-forecast-card {
    display: grid;
    grid-template-columns: minmax(160px, .34fr) minmax(0, 1fr);
    grid-template-rows: auto auto minmax(220px, 1fr);
    grid-column: 1;
    grid-row: 3;
    column-gap: 18px;
    padding: 18px;
    align-self: stretch;
}

body.pf-page .pf-report-layout--primary .pf-stress-card {
    display: flex;
    flex-direction: column;
    grid-column: 2;
    grid-row: 3;
    align-self: stretch;
}

body.pf-page .pf-report-layout--primary .pf-card-head {
    align-items: flex-start;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

body.pf-page .pf-report-layout--primary .pf-card-title {
    color: var(--text-primary);
    font-size: var(--pf-fs-card-title);
    font-weight: 600;
    line-height: 1.25;
}

body.pf-page .pf-report-layout--primary .pf-section-kicker {
    margin-bottom: 4px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
}

body.pf-page .pf-report-layout--primary .pf-curve-card > .pf-card-head,
body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-card-head {
    grid-column: 1 / -1;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
}

body.pf-page .pf-report-layout--primary .pf-curve-card > .pf-chart {
    width: 100%;
    min-height: 365px;
    height: 365px;
    margin-top: -4px;
    margin-inline: -8px;
}

body.pf-page .pf-report-layout--primary .pf-curve-card > .pf-curve-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 8px 0 0;
    border-top: 1px solid var(--app-divider-muted);
    border-bottom: 0;
}

body.pf-page .pf-curve-meta-item {
    display: grid;
    align-content: start;
    gap: 0;
    min-width: 0;
    min-height: 78px;
    padding: 12px 9px 8px;
    border: 0;
    border-right: 1px solid var(--app-divider-muted);
    background: transparent;
}

body.pf-page .pf-curve-meta-item:first-child {
    padding-left: 0;
}

body.pf-page .pf-curve-meta-item:last-child {
    padding-right: 0;
    border-right: 0;
}

body.pf-page .pf-curve-meta-sub {
    margin-top: 4px;
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-curve-meta-value.positive {
    color: var(--app-action-primary-color);
}

body.pf-page .pf-curve-meta-value.negative {
    color: var(--red-light);
}

body.pf-page .pf-curve-meta-value.warning {
    color: var(--warn-light);
}

body.pf-page .pf-curve-meta-value.neutral {
    color: var(--text-secondary);
}

body.pf-page .pf-curve-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
}

body.pf-page .pf-curve-heading {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    min-width: 0;
}

body.pf-page .pf-curve-heading-copy {
    flex: 0 0 auto;
}

body.pf-page .pf-curve-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-bottom: 1px;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.25;
}

body.pf-page .pf-curve-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

body.pf-page .pf-curve-legend span[hidden] {
    display: none;
}

body.pf-page .pf-curve-legend-mark {
    display: inline-block;
    width: 16px;
    height: 0;
    border-top: 2px solid var(--accent-secondary);
}

body.pf-page .pf-curve-legend-mark--target {
    border-top-width: 1px;
    border-top-style: dashed;
}

body.pf-page .pf-curve-legend-mark--worst {
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 50%;
    background: var(--red-light);
}

body.pf-page .pf-curve-head-state {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

body.pf-page .pf-curve-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 650;
}

body.pf-page .pf-curve-state::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

body.pf-page .pf-curve-state.pass {
    color: var(--app-action-primary-color);
}

body.pf-page .pf-curve-state.fail {
    color: var(--red-light);
}

body.pf-page .pf-curve-head-state span {
    color: var(--text-tertiary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 12px;
}

body.pf-page .pf-curve-status {
    display: inline-flex;
    align-items: center;
}

body.pf-page .pf-check-list {
    display: grid;
    grid-auto-rows: minmax(82px, 1fr);
    flex: 1 1 auto;
    gap: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

body.pf-page .pf-check-item {
    display: grid;
    align-content: center;
    align-items: stretch;
    justify-content: normal;
    gap: 10px;
    width: 100%;
    min-height: 0;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--app-divider-muted);
    border-radius: 0;
    background: transparent;
}

body.pf-page .pf-check-item:last-child {
    border-bottom: 0;
}

body.pf-page .pf-check-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

body.pf-page .pf-check-main {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(78px, .55fr) minmax(78px, .55fr);
    align-items: center;
    gap: 14px;
    width: 100%;
}

body.pf-page .pf-check-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

body.pf-page .pf-check-icon svg,
body.pf-page .pf-check-icon i {
    width: 16px;
    height: 16px;
}

body.pf-page .pf-check-icon.risk {
    border-color: var(--red-border);
    background: var(--red-bg);
    color: var(--red-light);
}

body.pf-page .pf-check-copy {
    min-width: 0;
}

body.pf-page .pf-check-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

body.pf-page .pf-check-detail {
    margin-top: 3px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-chip);
    line-height: 1.35;
}

body.pf-page .pf-check-metric {
    display: grid;
    gap: 3px;
    min-width: 0;
}

body.pf-page .pf-check-metric strong {
    overflow: hidden;
    color: var(--text-primary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-check-metric small {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-chip);
    line-height: 1.3;
}

body.pf-page .pf-check-metric.positive strong {
    color: var(--app-action-primary-color);
}

body.pf-page .pf-check-metric.negative strong {
    color: var(--red-light);
}

body.pf-page .pf-rule-meter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
}

body.pf-page .pf-rule-meter-row > span {
    min-width: 48px;
    color: var(--text-secondary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-chip);
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

body.pf-page .pf-rule-meter {
    width: 100%;
    height: 5px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    appearance: none;
    background: var(--app-surface-control);
}

body.pf-page .pf-rule-meter::-webkit-progress-bar {
    border-radius: inherit;
    background: var(--app-surface-control);
}

body.pf-page .pf-rule-meter::-webkit-progress-value {
    border-radius: inherit;
    background: var(--accent-secondary);
}

body.pf-page .pf-rule-meter.fail::-webkit-progress-value,
body.pf-page .pf-rule-meter.risk::-webkit-progress-value {
    background: var(--red-light);
}

body.pf-page .pf-rule-meter::-moz-progress-bar {
    border-radius: inherit;
    background: var(--accent-secondary);
}

body.pf-page .pf-rule-meter.fail::-moz-progress-bar,
body.pf-page .pf-rule-meter.risk::-moz-progress-bar {
    background: var(--red-light);
}

body.pf-page .pf-forecast-strip {
    display: grid;
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--app-divider-muted);
    border-bottom: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-forecast-strip .pf-monte-card,
body.pf-page .pf-forecast-strip .pf-monte-card:first-child,
body.pf-page .pf-forecast-strip .pf-monte-card:last-child {
    min-width: 0;
    padding: 11px;
    border: 0;
    border-right: 1px solid var(--app-divider-muted);
    background: transparent;
}

body.pf-page .pf-pressure-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin-top: 0;
    border-top: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-pressure-row,
body.pf-page .pf-report-layout--primary .pf-pressure-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 12px;
    padding: 12px 14px;
    border: 0;
    border-right: 1px solid var(--app-divider-muted);
    background: transparent;
}

body.pf-page .pf-pressure-row:first-child {
    padding-left: 0;
}

body.pf-page .pf-pressure-row:last-child {
    padding-right: 0;
    border-right: 0;
}

body.pf-page .pf-pressure-row-label,
body.pf-page .pf-pressure-row-value {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
}

body.pf-page .pf-pressure-row-meta {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-chip);
    line-height: 1.4;
}

body.pf-page .pf-pressure-row-value {
    grid-column: 2;
    grid-row: 1 / 3;
    font-family: 'DM Mono', ui-monospace, monospace;
    text-align: right;
    white-space: nowrap;
}

body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-strip {
    display: grid;
    grid-template-columns: 1fr;
    grid-column: 1;
    grid-row: 2 / span 2;
    align-self: stretch;
    border-top: 0;
    border-bottom: 0;
    border-right: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-strip .pf-monte-card,
body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-strip .pf-monte-card:first-child,
body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-strip .pf-monte-card:last-child {
    padding: 12px 14px 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-strip .pf-monte-card:last-child {
    border-bottom: 0;
}

body.pf-page .pf-forecast-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: var(--text-secondary);
    font-size: 12px;
    pointer-events: none;
}

body.pf-page .pf-forecast-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    line-height: 1.25;
}

body.pf-page .pf-forecast-legend .pf-forecast-boundary {
    margin-left: auto;
    color: var(--text-tertiary);
    font-family: var(--font-mono, "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

body.pf-page .pf-forecast-legend .pf-forecast-boundary::before {
    width: 16px;
    border-top: 1px dashed currentColor;
    content: '';
    opacity: 0.65;
}

body.pf-page .pf-forecast-key {
    display: block;
    flex: 0 0 auto;
    width: 24px;
    height: 8px;
    border: 0;
    border-radius: 3px;
    background: var(--forecast-key-fill);
}

body.pf-page .pf-forecast-key--outer {
    --forecast-key-fill: rgba(141, 141, 150, 0.09);
}

body.pf-page .pf-forecast-key--likely {
    --forecast-key-fill: rgba(77, 171, 154, 0.16);
}

body.pf-page .pf-forecast-key--typical {
    --forecast-key-border: var(--accent-secondary);
    --forecast-key-fill: var(--accent-secondary);
    height: 2px;
    border: 0;
    border-radius: 999px;
}

html.light body.pf-page .pf-forecast-key--outer {
    --forecast-key-fill: rgba(100, 116, 139, 0.09);
}

html.light body.pf-page .pf-forecast-key--likely {
    --forecast-key-fill: rgba(15, 118, 110, 0.14);
}

body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-legend {
    grid-column: 2;
    grid-row: 2;
    margin: 0 0 4px;
    color: var(--text-secondary);
}

body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-chart {
    grid-column: 2;
    grid-row: 3;
    min-height: 230px;
    height: 230px;
}

body.pf-page .pf-chart--forecast:focus {
    outline: 0;
}

body.pf-page .pf-chart--forecast:focus-visible {
    border-radius: var(--app-radius-control);
    outline: 1px solid rgba(111, 214, 198, 0.62);
    outline-offset: -2px;
}

body.pf-page .pf-chart--forecast .apexcharts-xaxis-label,
body.pf-page .pf-chart--forecast .apexcharts-yaxis-label {
    font-size: var(--pf-fs-chip);
}

body.pf-page .pf-stress-list {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

body.pf-page .pf-stress-heading {
    display: flex;
    align-items: center;
    gap: 7px;
}

body.pf-page .pf-stress-heading .pf-section-kicker {
    margin-bottom: 0;
}

body.pf-page .pf-stress-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
}

body.pf-page .pf-stress-info svg,
body.pf-page .pf-stress-info i {
    width: 13px;
    height: 13px;
}

body.pf-page .pf-stress-columns,
body.pf-page .pf-stress-row {
    display: grid;
    grid-template-columns: minmax(116px, .52fr) minmax(0, 1.48fr) 64px;
    align-items: center;
    gap: 14px;
}

body.pf-page .pf-stress-columns {
    padding: 0 0 7px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .055em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.pf-page .pf-stress-columns span:last-child {
    text-align: right;
}

body.pf-page .pf-stress-rows {
    display: grid;
    grid-template-rows: repeat(3, minmax(74px, 1fr));
    flex: 1 1 auto;
    min-height: 0;
}

body.pf-page .pf-stress-row {
    min-height: 74px;
    padding: 11px 0;
    border-bottom: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-stress-row:last-child,
body.pf-page .pf-stress-rows .pf-stress-row:last-child {
    border-bottom: 0;
}

body.pf-page .pf-stress-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

body.pf-page .pf-stress-title {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}

body.pf-page .pf-stress-meta {
    color: var(--text-secondary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

body.pf-page .pf-stress-measure,
body.pf-page .pf-stress-scale {
    min-width: 0;
}

body.pf-page .pf-stress-scale {
    display: grid;
    gap: 6px;
}

body.pf-page .pf-stress-track {
    position: relative;
    display: block;
    width: 100%;
    height: 7px;
    overflow: visible;
    border-radius: 999px;
    background: var(--app-border-default);
}

body.pf-page .pf-stress-fill {
    display: block;
    width: var(--pf-stress-usage, 0%);
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: var(--accent-secondary);
}

body.pf-page .pf-stress-limit-marker {
    position: absolute;
    top: -3px;
    right: 0;
    width: 2px;
    height: 13px;
    border-radius: 2px;
    background: var(--red-light);
}

body.pf-page .pf-stress-axis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    color: var(--text-tertiary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-chip);
    line-height: 1.2;
}

body.pf-page .pf-stress-axis span:nth-child(2) {
    text-align: center;
}

body.pf-page .pf-stress-axis span:last-child {
    text-align: right;
}

body.pf-page .pf-stress-value {
    color: var(--app-action-primary-color);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-align: right;
    white-space: nowrap;
}

body.pf-page .pf-stress-row.has-risk .pf-stress-value {
    color: var(--red-light);
}

body.pf-page .pf-stress-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 22px;
    padding-top: 11px;
    border-top: 1px solid var(--app-divider-muted);
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
}

body.pf-page .pf-stress-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.pf-page .pf-stress-legend-swatch {
    display: inline-block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
}

body.pf-page .pf-stress-legend-swatch--median {
    background: var(--accent-secondary);
}

body.pf-page .pf-stress-legend-swatch--limit {
    background: var(--red-light);
}

body.pf-page .pf-stress-note {
    margin: 9px 0 0;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.4;
}

body.pf-page .pf-stress-empty {
    display: grid;
    grid-template-columns: 40px minmax(0, 360px);
    align-items: center;
    align-content: center;
    justify-content: center;
    gap: 14px;
    flex: 1 1 auto;
    width: 100%;
    min-height: 190px;
    padding: 24px;
    color: var(--text-secondary);
}

body.pf-page .pf-stress-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--app-border-soft);
    border-radius: 50%;
    color: var(--text-tertiary);
}

body.pf-page .pf-stress-empty-icon svg,
body.pf-page .pf-stress-empty-icon i {
    width: 17px;
    height: 17px;
}

body.pf-page .pf-stress-empty-copy,
body.pf-page .pf-stress-empty-copy > strong,
body.pf-page .pf-stress-empty-copy > span {
    display: block;
}

body.pf-page .pf-stress-empty-copy > strong {
    color: var(--text-primary);
    font-size: var(--pf-fs-body);
    font-weight: 650;
    line-height: 1.35;
}

body.pf-page .pf-stress-empty-copy > span {
    max-width: 42ch;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: var(--pf-fs-support);
    line-height: 1.45;
}

body.pf-page .pf-stress-empty-progress {
    display: grid;
    gap: 7px;
    max-width: 300px;
    margin-top: 14px;
}

body.pf-page .pf-stress-empty-track {
    display: block;
    width: 100%;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--app-border-default);
}

body.pf-page .pf-stress-empty-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent-secondary);
}

body.pf-page .pf-stress-empty-progress small {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    line-height: 1.35;
}

@media (max-width: 520px) {
    body.pf-page .pf-stress-empty {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        min-height: 220px;
        padding: 24px 16px;
        text-align: center;
    }

    body.pf-page .pf-stress-empty-progress {
        width: min(100%, 280px);
        margin-inline: auto;
    }
}

body.pf-page .pf-inline-disclosure > summary {
    list-style: none;
}

body.pf-page .pf-inline-disclosure > summary::-webkit-details-marker {
    display: none;
}

body.pf-page .pf-fit-card .pf-disclosure-summary {
    display: grid;
    grid-template-areas: 'logos copy score metrics signal icon';
    grid-template-columns: 148px minmax(250px, 1fr) 72px minmax(300px, .8fr) auto 16px;
    align-items: center;
    gap: 20px;
    min-height: 88px;
    padding: 15px 18px;
    cursor: pointer;
}

body.pf-page .pf-fit-card .pf-disclosure-summary:hover {
    background: var(--app-surface-card-hover);
}

body.pf-page .pf-fit-card .pf-disclosure-summary:focus-visible {
    outline: 1px solid color-mix(in srgb, var(--accent) 58%, transparent);
    outline-offset: -1px;
}

body.pf-page .pf-fit-summary-copy {
    grid-area: copy;
    display: grid;
    gap: 3px;
    min-width: 0;
}

body.pf-page .pf-fit-summary-copy > small,
body.pf-page .pf-fit-summary-best > small {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .055em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.pf-page .pf-fit-summary-copy > strong {
    color: var(--text-primary);
    font-size: var(--pf-fs-body);
    font-weight: 620;
    line-height: 1.3;
}

body.pf-page .pf-fit-summary-metrics {
    grid-area: metrics;
    display: grid;
    grid-template-columns: repeat(3, minmax(82px, 1fr));
    min-width: 0;
    border-right: 1px solid var(--app-divider-muted);
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-fit-summary-metrics > span {
    display: grid;
    min-width: 0;
    gap: 3px;
    padding: 0 16px;
}

body.pf-page .pf-fit-summary-metrics > span + span {
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-fit-summary-metrics small {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .055em;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

body.pf-page .pf-fit-summary-metrics strong {
    overflow: hidden;
    color: var(--text-primary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-body-sm);
    font-weight: 550;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-fit-summary-signal {
    grid-area: signal;
    display: grid;
    grid-template-columns: minmax(120px, auto) auto;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

body.pf-page .pf-fit-summary-brands {
    grid-area: logos;
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0;
}

body.pf-page .pf-fit-summary-brands[hidden] {
    display: none;
}

body.pf-page .pf-fit-summary-brand {
    position: relative;
    margin-left: -6px;
}

body.pf-page .pf-fit-summary-brand:first-child {
    margin-left: 0;
}

body.pf-page .pf-fit-summary-brand:nth-child(1) { z-index: 5; }
body.pf-page .pf-fit-summary-brand:nth-child(2) { z-index: 4; }
body.pf-page .pf-fit-summary-brand:nth-child(3) { z-index: 3; }
body.pf-page .pf-fit-summary-brand:nth-child(4) { z-index: 2; }
body.pf-page .pf-fit-summary-brand:nth-child(5) { z-index: 1; }

body.pf-page .pf-fit-summary-best {
    display: grid;
    gap: 3px;
    min-width: 0;
}

body.pf-page .pf-fit-summary-best > strong,
body.pf-page .pf-fit-summary-score {
    overflow: hidden;
    color: var(--text-primary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-fit-summary-score {
    color: var(--app-action-primary-color);
    font-family: 'DM Mono', ui-monospace, monospace;
}

body.pf-page .pf-fit-summary-score-wrap {
    grid-area: score;
    display: grid;
    min-width: 62px;
    gap: 6px;
}

body.pf-page .pf-fit-summary-score-wrap progress {
    width: 62px;
    height: 3px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: var(--app-divider-strong);
    accent-color: var(--app-action-primary-color);
}

body.pf-page .pf-fit-summary-score-wrap progress::-webkit-progress-bar {
    border-radius: 999px;
    background: var(--app-divider-strong);
}

body.pf-page .pf-fit-summary-score-wrap progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--app-action-primary-color);
}

body.pf-page .pf-fit-summary-count {
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid var(--app-border-soft);
    border-radius: var(--app-radius-control);
    color: var(--text-secondary);
    font-size: var(--pf-fs-chip);
    line-height: 16px;
    white-space: nowrap;
}

body.pf-page .pf-fit-card .pf-disclosure-summary > svg,
body.pf-page .pf-fit-card .pf-disclosure-summary > i {
    grid-area: icon;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--text-tertiary);
    transition: transform var(--duration-normal) var(--ease-out);
}

body.pf-page .pf-fit-card[open] > .pf-disclosure-summary {
    border-bottom: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-fit-card[open] > .pf-disclosure-summary > svg,
body.pf-page .pf-fit-card[open] > .pf-disclosure-summary > i {
    transform: rotate(180deg);
}

body.pf-page .pf-fit-card {
    margin: 0;
    padding: 0;
    border: 1px solid var(--app-border-soft);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-card);
}

body.pf-page .pf-fit-content {
    padding: 18px;
}

body.pf-page .pf-fit-intro,
body.pf-page .pf-fit-footer-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

body.pf-page .pf-fit-note {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--pf-fs-body-sm);
    line-height: 1.5;
}

body.pf-page .pf-fit-footer-note a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    color: var(--text-secondary);
    font-size: var(--pf-fs-chip);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

body.pf-page .pf-fit-footer-note a > svg,
body.pf-page .pf-fit-footer-note a > i {
    width: 14px;
    height: 14px;
}

body.pf-page .pf-fit-footer-note a {
    color: var(--app-action-primary-color);
}

body.pf-page .pf-fit-method {
    position: relative;
    flex: 0 0 auto;
}

body.pf-page .pf-fit-method > summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
    font-size: var(--pf-fs-chip);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

body.pf-page .pf-fit-method > summary::-webkit-details-marker {
    display: none;
}

body.pf-page .pf-fit-method > summary:focus-visible {
    color: var(--app-action-primary-color);
    outline: 1px solid color-mix(in srgb, var(--accent) 58%, transparent);
    outline-offset: 3px;
}

body.pf-page .pf-fit-method > summary > svg,
body.pf-page .pf-fit-method > summary > i {
    width: 14px;
    height: 14px;
}

body.pf-page .pf-fit-method > p {
    position: absolute;
    z-index: 4;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    margin: 0;
    padding: 11px 12px;
    border: 1px solid var(--app-border-default);
    border-radius: var(--app-radius-control);
    background: var(--app-surface-control);
    color: var(--text-secondary);
    font-size: var(--pf-fs-support);
    line-height: 1.45;
}

body.pf-page .pf-fit-board {
    display: grid;
    grid-template-columns: minmax(260px, .34fr) minmax(0, 1fr);
    margin-top: 16px;
    border-top: 1px solid var(--app-divider-muted);
    border-bottom: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-fit-profile {
    min-width: 0;
    padding: 18px 20px 18px 0;
    border-right: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-fit-profile-head {
    margin-bottom: 18px;
}

body.pf-page .pf-fit-profile-head > div {
    display: grid;
    gap: 4px;
}

body.pf-page .pf-fit-profile-head .pf-card-title {
    font-size: var(--pf-fs-card-title);
    font-weight: 600;
}

body.pf-page .pf-fit-profile-list {
    display: grid;
}

body.pf-page .pf-fit-profile-lead {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 0 0 16px;
}

body.pf-page .pf-fit-profile-lead-icon,
body.pf-page .pf-fit-profile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid var(--app-border-muted);
    border-radius: var(--app-radius-control);
    background: var(--app-surface-control);
    color: var(--text-secondary);
}

body.pf-page .pf-fit-profile-lead-icon {
    width: 38px;
    height: 38px;
}

body.pf-page .pf-fit-profile-lead-icon > svg,
body.pf-page .pf-fit-profile-lead-icon > i {
    width: 17px;
    height: 17px;
}

body.pf-page .pf-fit-profile-lead.pass .pf-fit-profile-lead-icon {
    border-color: var(--app-action-primary-border);
    color: var(--app-action-primary-color);
}

body.pf-page .pf-fit-profile-lead.tracking .pf-fit-profile-lead-icon {
    border-color: color-mix(in srgb, var(--warn-light) 38%, transparent);
    color: var(--warn-light);
}

body.pf-page .pf-fit-profile-lead.fail .pf-fit-profile-lead-icon {
    border-color: color-mix(in srgb, var(--red-light) 38%, transparent);
    color: var(--red-light);
}

body.pf-page .pf-fit-profile-lead-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

body.pf-page .pf-fit-profile-lead-copy > small,
body.pf-page .pf-fit-profile-lead-score > small {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .055em;
    text-transform: uppercase;
}

body.pf-page .pf-fit-profile-lead-copy > strong {
    color: var(--text-primary);
    font-size: var(--pf-fs-body);
    font-weight: 620;
    line-height: 1.3;
}

body.pf-page .pf-fit-profile-lead-copy > span {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-meta);
    line-height: 1.35;
}

body.pf-page .pf-fit-profile-lead-score {
    display: grid;
    justify-items: end;
    gap: 1px;
    padding-left: 10px;
}

body.pf-page .pf-fit-profile-lead-score > strong {
    color: var(--app-action-primary-color);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
}

body.pf-page .pf-fit-profile-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px 10px;
    padding: 12px 0;
    border-top: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-fit-profile-icon {
    grid-row: 1 / 3;
    width: 30px;
    height: 30px;
    margin-top: 1px;
}

body.pf-page .pf-fit-profile-icon > svg,
body.pf-page .pf-fit-profile-icon > i {
    width: 14px;
    height: 14px;
}

body.pf-page .pf-fit-profile-row.warning .pf-fit-profile-icon {
    border-color: color-mix(in srgb, var(--warn-light) 32%, transparent);
    color: var(--warn-light);
}

body.pf-page .pf-fit-profile-metric {
    display: grid;
    min-width: 0;
    gap: 2px;
}

body.pf-page .pf-fit-profile-value-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

body.pf-page .pf-fit-profile-value-row > span {
    color: var(--text-primary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 550;
}

body.pf-page .pf-fit-profile-value-row > strong {
    color: var(--text-primary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-body-sm);
    font-weight: 550;
}

body.pf-page .pf-fit-profile-metric > small,
body.pf-page .pf-fit-cell > small,
body.pf-page .pf-fit-program-copy > small {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    line-height: 1.35;
}

body.pf-page .pf-fit-profile-row progress,
body.pf-page .pf-fit-overall progress {
    width: 100%;
    height: 4px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: var(--app-divider-strong);
    accent-color: var(--app-action-primary-color);
}

body.pf-page .pf-fit-profile-row progress {
    grid-column: 2;
}

body.pf-page .pf-fit-profile-row progress::-webkit-progress-bar,
body.pf-page .pf-fit-overall progress::-webkit-progress-bar {
    border-radius: 999px;
    background: var(--app-divider-strong);
}

body.pf-page .pf-fit-profile-row progress::-webkit-progress-value,
body.pf-page .pf-fit-overall progress::-webkit-progress-value {
    border-radius: 999px;
    background: var(--app-action-primary-color);
}

body.pf-page .pf-fit-profile-row.warning progress,
body.pf-page .pf-fit-row[data-fit-tone="tracking"] .pf-fit-overall progress {
    accent-color: var(--warn-light);
}

body.pf-page .pf-fit-profile-row.warning progress::-webkit-progress-value,
body.pf-page .pf-fit-row[data-fit-tone="tracking"] .pf-fit-overall progress::-webkit-progress-value {
    background: var(--warn-light);
}

body.pf-page .pf-fit-row[data-fit-tone="fail"] .pf-fit-overall progress {
    accent-color: var(--red-light);
}

body.pf-page .pf-fit-row[data-fit-tone="fail"] .pf-fit-overall progress::-webkit-progress-value {
    background: var(--red-light);
}

body.pf-page .pf-fit-profile-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 4px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-fit-profile-summary > span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 0 12px;
    border-left: 1px solid var(--app-divider-muted);
    background: transparent;
}

body.pf-page .pf-fit-profile-summary > span:first-child {
    padding-left: 0;
    border-left: 0;
}

body.pf-page .pf-fit-profile-summary > span:last-child {
    padding-right: 0;
}

body.pf-page .pf-fit-profile-summary small {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .045em;
    line-height: 1.25;
    text-transform: uppercase;
}

body.pf-page .pf-fit-profile-summary strong {
    color: var(--text-primary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-body-sm);
    font-weight: 550;
    line-height: 1.3;
}

body.pf-page .pf-fit-profile-empty {
    color: var(--text-secondary);
    font-size: var(--pf-fs-body-sm);
    line-height: 1.5;
}

body.pf-page .pf-fit-ranking {
    min-width: 0;
    padding: 18px 0 18px 20px;
}

body.pf-page .pf-fit-ranking-scroll {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

body.pf-page .pf-fit-limited {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 16px;
    padding: 18px 10px 0;
    border-top: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-fit-limited[hidden] {
    display: none;
}

body.pf-page .pf-fit-limited strong {
    color: var(--text-primary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 650;
}

body.pf-page .pf-fit-limited p {
    max-width: 460px;
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: var(--pf-fs-support);
    line-height: 1.45;
}

body.pf-page .pf-fit-limited .app-action-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

body.pf-page .pf-fit-limited .app-action-btn[hidden] {
    display: none;
}

@media (max-width: 760px) {
    body.pf-page .pf-fit-limited {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    body.pf-page .pf-fit-limited .app-action-btn {
        width: 100%;
    }
}

body.pf-page .pf-fit-table-head,
body.pf-page .pf-fit-row {
    display: grid;
    grid-template-columns: minmax(235px, 1.35fr) minmax(92px, .55fr) minmax(105px, .65fr) minmax(118px, .72fr) minmax(118px, .72fr) minmax(132px, .82fr) 104px;
    align-items: center;
    column-gap: 14px;
    min-width: 980px;
}

body.pf-page .pf-fit-table-head {
    min-height: 32px;
    padding: 0 10px 8px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .055em;
    text-transform: uppercase;
}

body.pf-page .pf-fit-list {
    display: block;
    min-width: 980px;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

body.pf-page .pf-fit-row {
    position: relative;
    min-height: 72px;
    padding: 11px 10px;
    border-top: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-fit-row.is-current {
    background: color-mix(in srgb, var(--accent-subtle) 52%, transparent);
    box-shadow: inset 2px 0 0 var(--app-action-primary-border-hover);
}

body.pf-page .pf-fit-row.is-top-match::before {
    content: '';
    position: absolute;
    inset: 9px auto 9px 0;
    width: 2px;
    border-radius: 999px;
    background: var(--app-action-primary-color);
}

body.pf-page .pf-fit-program {
    display: grid;
    grid-template-columns: 26px 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body.pf-page .pf-fit-rank {
    color: var(--text-tertiary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-body-sm);
    font-weight: 550;
}

body.pf-page .pf-fit-program-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

body.pf-page .pf-fit-program-copy > strong {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    color: var(--text-primary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-fit-program-copy > small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-fit-current {
    flex: 0 0 auto;
    padding: 2px 6px;
    border: 1px solid var(--app-action-primary-border);
    border-radius: 999px;
    background: var(--app-surface-card);
    color: var(--app-action-primary-color);
    font-size: var(--pf-fs-chip);
    font-weight: 650;
    line-height: 1.2;
}

body.pf-page .pf-fit-cell {
    display: grid;
    align-content: center;
    gap: 3px;
    min-width: 0;
}

body.pf-page .pf-fit-cell > strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 550;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-fit-cell.warning > strong,
body.pf-page .pf-fit-outcome.tracking > strong {
    color: var(--warn-light);
}

body.pf-page .pf-fit-outcome.pass > strong {
    color: var(--app-action-primary-color);
}

body.pf-page .pf-fit-outcome.fail > strong {
    color: var(--red-light);
}

body.pf-page .pf-fit-overall {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

body.pf-page .pf-fit-overall > strong {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-metric);
}

body.pf-page .pf-fit-cell-label {
    display: none;
}

body.pf-page .pf-fit-row-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--app-action-primary-border);
    border-radius: var(--app-radius-control);
    background: var(--accent-subtle);
    color: var(--app-action-primary-color);
    font-size: var(--pf-fs-chip);
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

body.pf-page .pf-fit-row-link:hover,
body.pf-page .pf-fit-row-link:focus-visible {
    border-color: var(--app-action-primary-border-hover);
    background: var(--app-action-primary-bg-hover);
    color: var(--app-action-primary-color-hover);
    outline: 0;
}

body.pf-page .pf-fit-row-link > svg,
body.pf-page .pf-fit-row-link > i {
    width: 15px;
    height: 15px;
}

body.pf-page .pf-fit-ranked-more {
    border-top: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-fit-ranked-more > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    color: var(--text-secondary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

body.pf-page .pf-fit-ranked-more > summary::-webkit-details-marker {
    display: none;
}

body.pf-page .pf-fit-ranked-more > summary > svg,
body.pf-page .pf-fit-ranked-more > summary > i {
    width: 15px;
    height: 15px;
    transition: transform var(--duration-normal) var(--ease-out);
}

body.pf-page .pf-fit-ranked-more[open] > summary > svg,
body.pf-page .pf-fit-ranked-more[open] > summary > i {
    transform: rotate(180deg);
}

body.pf-page .pf-fit-manual .pf-fit-manual-coverage {
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--app-divider-muted);
    border-radius: 0;
    background: transparent;
}

body.pf-page .pf-fit-manual .pf-fit-manual-coverage > summary {
    padding-right: 0;
    padding-left: 0;
}

body.pf-page .pf-fit-manual-toolbar > span,
body.pf-page .pf-fit-manual-copy small,
body.pf-page .pf-fit-manual-status {
    font-size: var(--pf-fs-chip);
}

body.pf-page .pf-fit-manual-status {
    min-height: 24px;
    line-height: 1;
}

body.pf-page .pf-fit-footer-note {
    margin-top: 16px;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
}

@media (max-width: 1100px) {
    body.pf-page .pf-fit-card .pf-disclosure-summary {
        grid-template-areas:
            'logos copy score signal icon'
            'logos metrics metrics metrics .';
        grid-template-columns: 80px minmax(0, 1fr) 72px auto 16px;
        row-gap: 12px;
    }

    body.pf-page .pf-fit-summary-brand {
        width: 28px;
        min-width: 28px;
        height: 28px;
        flex-basis: 28px;
        margin-left: -5px;
        border-radius: 7px;
    }

    body.pf-page .pf-fit-summary-brand:nth-child(n + 4) {
        display: none;
    }

    body.pf-page .pf-fit-summary-metrics {
        border-right: 0;
        border-left: 0;
    }

    body.pf-page .pf-fit-summary-metrics > span:first-child {
        padding-left: 0;
    }

    body.pf-page .pf-fit-summary-metrics > span:last-child {
        padding-right: 0;
    }

    body.pf-page .pf-fit-board {
        grid-template-columns: minmax(0, 1fr);
    }

    body.pf-page .pf-fit-profile {
        padding: 18px 0;
        border-right: 0;
        border-bottom: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-fit-profile-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0;
    }

    body.pf-page .pf-fit-profile-lead {
        grid-column: 1 / -1;
    }

    body.pf-page .pf-fit-profile-row {
        padding: 12px 14px;
        border-right: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-fit-profile-lead + .pf-fit-profile-row {
        padding-left: 0;
    }

    body.pf-page .pf-fit-profile-row:last-of-type {
        padding-right: 0;
        border-right: 0;
    }

    body.pf-page .pf-fit-profile-summary {
        grid-column: 1 / -1;
        margin-top: 16px;
    }

    body.pf-page .pf-fit-ranking {
        padding: 18px 0 0;
    }

    body.pf-page .pf-fit-table-head,
    body.pf-page .pf-fit-row {
        grid-template-columns: minmax(210px, 1.25fr) 78px 94px 104px 104px 112px 104px;
        column-gap: 10px;
        min-width: 932px;
    }

    body.pf-page .pf-fit-list {
        min-width: 932px;
    }
}

@media (max-width: 820px) {
    body.pf-page .pf-fit-card .pf-disclosure-summary {
        grid-template-areas:
            'logos copy score icon'
            'metrics metrics metrics .'
            'signal signal signal .';
        grid-template-columns: 80px minmax(0, 1fr) 62px 16px;
        gap: 12px 10px;
        padding: 14px 16px;
    }

    body.pf-page .pf-fit-summary-signal {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
    }

    body.pf-page .pf-fit-summary-brands {
        min-width: 0;
        padding: 0;
    }

    body.pf-page .pf-fit-card .pf-disclosure-summary > svg,
    body.pf-page .pf-fit-card .pf-disclosure-summary > i {
        align-self: center;
    }

    body.pf-page .pf-fit-content {
        padding: 16px;
    }

    body.pf-page .pf-fit-intro,
    body.pf-page .pf-fit-footer-note {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    body.pf-page .pf-fit-profile-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 0;
    }

    body.pf-page .pf-fit-profile-row:nth-of-type(3) {
        padding-right: 0;
        border-right: 0;
    }

    body.pf-page .pf-fit-profile-row:nth-of-type(4) {
        padding-left: 0;
    }

    body.pf-page .pf-fit-ranking-scroll {
        overflow: visible;
    }

    body.pf-page .pf-fit-table-head {
        display: none;
    }

    body.pf-page .pf-fit-list,
    body.pf-page .pf-fit-row {
        min-width: 0;
    }

    body.pf-page .pf-fit-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 18px;
        padding: 16px 0;
    }

    body.pf-page .pf-fit-row.is-current {
        background: transparent;
        box-shadow: none;
    }

    body.pf-page .pf-fit-row.is-top-match::before {
        inset: 14px auto 14px -8px;
    }

    body.pf-page .pf-fit-program {
        grid-column: 1 / -1;
        padding-right: 112px;
    }

    body.pf-page .pf-fit-cell {
        padding-top: 10px;
        border-top: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-fit-cell-label {
        display: block;
        color: var(--text-tertiary);
        font-size: var(--pf-fs-kicker);
        font-weight: 650;
        letter-spacing: .055em;
        text-transform: uppercase;
    }

    body.pf-page .pf-fit-overall {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    body.pf-page .pf-fit-overall .pf-fit-cell-label {
        grid-column: 1 / -1;
    }

    body.pf-page .pf-fit-row-link {
        position: absolute;
        top: 16px;
        right: 0;
        min-height: 36px;
    }

    body.pf-page .pf-fit-method {
        width: 100%;
    }

    body.pf-page .pf-fit-method > p {
        position: static;
        width: auto;
        margin-top: 10px;
    }
}

@media (max-width: 440px) {
    body.pf-page .pf-fit-summary-count {
        display: none;
    }

    body.pf-page .pf-fit-summary-signal {
        gap: 8px;
    }

    body.pf-page .pf-fit-summary-best > strong {
        display: -webkit-box;
        overflow: hidden;
        line-height: 1.2;
        white-space: normal;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    body.pf-page .pf-fit-summary-metrics > span {
        padding: 0 10px;
    }

    body.pf-page .pf-fit-summary-metrics > span:first-child {
        padding-left: 0;
    }

    body.pf-page .pf-fit-summary-metrics > span:last-child {
        padding-right: 0;
    }

    body.pf-page .pf-fit-profile-list {
        grid-template-columns: minmax(0, 1fr);
    }

    body.pf-page .pf-fit-profile-row,
    body.pf-page .pf-fit-profile-lead + .pf-fit-profile-row,
    body.pf-page .pf-fit-profile-row:nth-of-type(3),
    body.pf-page .pf-fit-profile-row:nth-of-type(4),
    body.pf-page .pf-fit-profile-row:last-of-type {
        padding: 0;
        border-right: 0;
    }

    body.pf-page .pf-fit-profile-row + .pf-fit-profile-row {
        padding-top: 16px;
        border-top: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-fit-profile-lead {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        gap: 10px;
    }

    body.pf-page .pf-fit-profile-lead-icon {
        width: 36px;
        height: 36px;
    }

    body.pf-page .pf-fit-profile-summary {
        grid-column: 1;
    }
}

@media (max-width: 440px) {
    body.pf-page .pf-fit-profile-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 14px;
    }

    body.pf-page .pf-fit-profile-summary > span:nth-child(3) {
        grid-column: 1 / -1;
        padding: 14px 0 0;
        border-top: 1px solid var(--app-divider-muted);
        border-left: 0;
    }
}

body.pf-page .pf-report-section--secondary {
    display: grid;
    gap: var(--pf-report-section-gap);
    margin-top: 0 !important;
}

body.pf-page .pf-replay-ledger {
    --pf-replay-ledger-inline: 18px;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--app-border-soft);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-card);
    box-shadow: none;
}

body.pf-page .pf-replay-ledger-head {
    padding: 16px var(--pf-replay-ledger-inline) 14px;
    border-bottom: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-replay-ledger-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

body.pf-page .pf-replay-ledger-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

body.pf-page .pf-replay-ledger-title-row .pf-card-title {
    min-width: 0;
}

body.pf-page .pf-replay-ledger-count {
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 1px solid var(--app-border-soft);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: var(--pf-fs-chip);
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

body.pf-page .pf-trade-ledger-note {
    max-width: 88ch;
    margin: 2px 0 0;
    padding: 0;
    color: var(--text-secondary);
    font-size: var(--pf-fs-meta);
    line-height: 1.45;
}

body.pf-page .pf-trade-ledger-scroll {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

body.pf-page .pf-trade-ledger-scroll:focus-visible {
    outline: 1px solid var(--app-action-primary-border-hover);
    outline-offset: -2px;
}

body.pf-page .pf-trade-ledger-table {
    --pf-trade-ledger-columns: minmax(132px, .74fr) minmax(168px, 1.1fr) minmax(78px, .48fr) minmax(170px, 1.18fr) minmax(128px, .7fr) minmax(88px, .48fr);
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

body.pf-page .pf-trade-ledger-table thead,
body.pf-page .pf-trade-ledger-table tbody {
    display: block;
}

body.pf-page .pf-trade-ledger-table thead tr,
body.pf-page .pf-trade-ledger-table tbody tr {
    display: grid;
    grid-template-columns: var(--pf-trade-ledger-columns);
    align-items: center;
}

body.pf-page .pf-trade-ledger-table th,
body.pf-page .pf-trade-ledger-table td {
    min-width: 0;
    border: 0;
    background: transparent;
    text-align: left;
}

body.pf-page .pf-trade-ledger-table th {
    padding: 10px var(--pf-replay-ledger-inline);
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 700;
    letter-spacing: .055em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.pf-page .pf-trade-ledger-table th:nth-child(5) {
    text-align: right;
}

body.pf-page .pf-trade-ledger-row {
    min-height: 64px;
    border-top: 1px solid var(--app-divider-muted);
    transition: background-color var(--duration-fast) var(--ease-out);
}

body.pf-page .pf-trade-ledger-row:hover {
    background: var(--app-control-tint);
}

body.pf-page .pf-trade-ledger-row td {
    padding: 9px var(--pf-replay-ledger-inline);
    color: var(--text-secondary);
    font-size: var(--pf-fs-meta);
    line-height: 1.35;
}

body.pf-page .pf-trade-ledger-date,
body.pf-page .pf-trade-ledger-symbol,
body.pf-page .pf-trade-ledger-pnl {
    display: grid;
    gap: 3px;
}

body.pf-page .pf-trade-ledger-date strong,
body.pf-page .pf-trade-ledger-symbol strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-trade-ledger-date small,
body.pf-page .pf-trade-ledger-symbol small,
body.pf-page .pf-trade-ledger-pnl small {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-trade-ledger-symbol > div {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

body.pf-page .pf-trade-ledger-trade-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    border-radius: 4px;
    color: var(--text-primary);
    text-decoration: none;
}

body.pf-page .pf-trade-ledger-trade-link:hover,
body.pf-page .pf-trade-ledger-trade-link:focus-visible {
    color: var(--app-action-primary-color);
}

body.pf-page .pf-trade-ledger-trade-link:focus-visible {
    outline: 1px solid var(--app-action-primary-border-hover);
    outline-offset: 3px;
}

body.pf-page .pf-trade-ledger-trade-link svg,
body.pf-page .pf-trade-ledger-trade-link i {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    color: var(--text-tertiary);
}

body.pf-page .pf-trade-ledger-trade-link:hover svg,
body.pf-page .pf-trade-ledger-trade-link:focus-visible svg,
body.pf-page .pf-trade-ledger-trade-link:hover i,
body.pf-page .pf-trade-ledger-trade-link:focus-visible i {
    color: currentColor;
}

body.pf-page .pf-trade-side,
body.pf-page .pf-trade-result {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: var(--pf-fs-chip);
    font-weight: 750;
    letter-spacing: .055em;
    line-height: 1;
}

body.pf-page .pf-trade-side--long {
    border-color: var(--app-action-primary-border);
    background: var(--app-action-primary-bg);
    color: var(--app-action-primary-color);
}

body.pf-page .pf-trade-side--short {
    border-color: var(--red-border);
    background: var(--red-bg);
    color: var(--red-light);
}

body.pf-page .pf-trade-side--none,
body.pf-page .pf-trade-result--breakeven {
    border-color: var(--app-border-soft);
    background: var(--app-control-tint);
    color: var(--text-secondary);
}

body.pf-page .pf-trade-ledger-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

body.pf-page .pf-trade-ledger-tags span,
body.pf-page .pf-trade-ledger-tags small {
    max-width: 152px;
    overflow: hidden;
    padding: 4px 9px;
    border: 1px solid var(--app-action-primary-border);
    border-radius: 999px;
    background: var(--app-action-primary-bg);
    color: var(--app-action-primary-color);
    font-size: var(--pf-fs-chip);
    font-weight: 500;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-trade-ledger-tags small {
    border-color: var(--app-border-soft);
    background: var(--app-control-tint);
    color: var(--text-tertiary);
}

body.pf-page .pf-trade-ledger-empty-value {
    color: var(--text-tertiary);
    font-size: 12px;
}

body.pf-page .pf-trade-ledger-pnl {
    justify-items: end;
    text-align: right;
}

body.pf-page .pf-trade-ledger-pnl strong {
    color: var(--text-primary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-body-sm);
    font-weight: 600;
    white-space: nowrap;
}

body.pf-page .pf-trade-ledger-pnl.positive strong {
    color: var(--green-light);
}

body.pf-page .pf-trade-ledger-pnl.negative strong {
    color: var(--red-light);
}

body.pf-page .pf-trade-result--win {
    border-color: var(--app-action-primary-border);
    color: var(--app-action-primary-color);
}

body.pf-page .pf-trade-result--loss {
    border-color: var(--red-border);
    color: var(--red-light);
}

body.pf-page .pf-trade-ledger-empty {
    padding: 24px var(--pf-replay-ledger-inline);
    color: var(--text-tertiary);
    font-size: 13px;
    line-height: 1.5;
}

body.pf-page .pf-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body.pf-page .pf-secondary-rail {
    overflow: hidden;
    border: 1px solid var(--app-border-soft);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-card);
}

body.pf-page .pf-secondary-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.pf-page .pf-secondary-summary {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 68px;
    padding: 14px 18px;
    border-right: 1px solid var(--app-divider-muted);
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

body.pf-page .pf-secondary-summary:last-child {
    border-right: 0;
}

body.pf-page .pf-secondary-summary > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

body.pf-page .pf-secondary-summary small {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .055em;
    text-transform: uppercase;
}

body.pf-page .pf-secondary-summary strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: var(--pf-fs-body);
    font-weight: 620;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-secondary-summary:hover {
    background: var(--app-control-tint);
}

body.pf-page .pf-secondary-summary:focus-visible {
    outline: 1px solid var(--app-action-primary-border-hover);
    outline-offset: -3px;
}

body.pf-page .pf-secondary-summary.is-active strong {
    color: var(--app-action-primary-color);
}

body.pf-page .pf-secondary-summary.is-active {
    background: color-mix(in srgb, var(--app-action-primary-bg) 42%, transparent);
    box-shadow: inset 0 -1px var(--app-action-primary-border-hover);
}

body.pf-page .pf-secondary-panel {
    min-width: 0;
    padding: 16px;
    border-top: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-secondary-panel[hidden] {
    display: none !important;
}

body.pf-page .pf-insights-panel {
    padding: 0;
}

body.pf-page .pf-insights-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, .95fr);
    gap: 0;
    padding: 20px;
}

body.pf-page .pf-insights-readout,
body.pf-page .pf-insights-health {
    min-width: 0;
}

body.pf-page .pf-insights-health {
    margin-left: 24px;
    padding-left: 24px;
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-insights-lead {
    max-width: 68ch;
    margin: 14px 0 0;
    color: var(--text-primary);
    font-size: var(--pf-fs-body-sm);
    line-height: 1.55;
}

body.pf-page .pf-insights-action-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 16px;
    border-top: 1px solid var(--app-divider-muted);
    border-bottom: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-insights-action {
    min-width: 0;
    padding: 14px 16px;
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-insights-action:first-child {
    padding-left: 0;
    border-left: 0;
}

body.pf-page .pf-insights-action:last-child {
    padding-right: 0;
}

body.pf-page .pf-insights-action-index {
    margin-bottom: 8px;
    color: var(--text-tertiary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-chip);
    font-weight: 650;
    line-height: 1.4;
}

body.pf-page .pf-insights-action-title,
body.pf-page .pf-insights-alert-title {
    color: var(--text-primary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 650;
    line-height: 1.35;
}

body.pf-page .pf-insights-action-copy,
body.pf-page .pf-insights-alert-detail {
    margin-top: 3px;
    color: var(--text-secondary);
    font-size: var(--pf-fs-support);
    line-height: 1.45;
}

body.pf-page .pf-insights-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
    border-top: 1px solid var(--app-divider-muted);
    border-bottom: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-insights-metric {
    min-width: 0;
    padding: 12px;
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-insights-metric:first-child {
    padding-left: 0;
    border-left: 0;
}

body.pf-page .pf-insights-metric:last-child {
    padding-right: 0;
}

body.pf-page .pf-insights-metric-label {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .055em;
    line-height: 1.35;
    text-transform: uppercase;
}

body.pf-page .pf-insights-metric-value {
    margin-top: 6px;
    overflow: hidden;
    color: var(--text-primary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-body);
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-insights-alerts {
    display: grid;
}

body.pf-page .pf-insights-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 14px 0;
    border-bottom: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-insights-alert:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

body.pf-page .pf-insights-alert-main {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-width: 0;
}

body.pf-page .pf-insights-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border: 1px solid var(--app-border-soft);
    border-radius: 6px;
    color: var(--text-secondary);
}

body.pf-page .pf-insights-alert-icon svg,
body.pf-page .pf-insights-alert-icon i {
    width: 13px;
    height: 13px;
}

body.pf-page .pf-insights-alert-icon.pass {
    border-color: var(--green-border);
    background: var(--green-bg);
    color: var(--green-light);
}

body.pf-page .pf-insights-alert-icon.fail {
    border-color: var(--red-border);
    background: var(--red-bg);
    color: var(--red-light);
}

body.pf-page .pf-insights-alert-icon.warning {
    border-color: color-mix(in srgb, var(--warn) 25%, transparent);
    background: color-mix(in srgb, var(--warn) 10%, transparent);
    color: var(--warn-light);
}

body.pf-page .pf-insights-alert-value {
    flex: 0 0 auto;
    color: var(--text-primary);
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: var(--pf-fs-body-sm);
    font-weight: 650;
    white-space: nowrap;
}

body.pf-page .pf-insights-coach {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 18px 20px;
    border-top: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-insights-coach-copy {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    min-width: 0;
}

body.pf-page .pf-insights-coach-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--app-action-primary-color);
}

body.pf-page .pf-insights-coach-mark svg,
body.pf-page .pf-insights-coach-mark i {
    width: 17px;
    height: 17px;
}

body.pf-page .pf-insights-coach .pf-card-title {
    margin-top: 2px;
}

body.pf-page .pf-insights-coach p {
    max-width: 72ch;
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-size: var(--pf-fs-support);
    line-height: 1.45;
}

body.pf-page .pf-insights-coach-btn {
    min-width: 154px;
    min-height: 40px;
    justify-content: center;
    white-space: nowrap;
}

/* Single saved checkpoint is one readable timeline event, not a nested card.
 * Keep the structural owner here with the rest of the current report shell. */
body.pf-page .pf-replay-checkpoint-summary {
    display: grid;
    grid-template-columns: minmax(230px, .85fr) minmax(430px, 1.35fr) minmax(230px, .8fr);
    align-items: center;
    gap: 24px;
    min-width: 0;
    padding: 17px 0;
    border-block: 1px solid var(--app-divider-muted);
    --pf-checkpoint-status: var(--amber);
    --pf-checkpoint-status-bg: var(--amber-bg);
}

body.pf-page .pf-replay-checkpoint-summary.pass {
    --pf-checkpoint-status: var(--app-action-primary-color);
    --pf-checkpoint-status-bg: var(--app-action-primary-bg);
}

body.pf-page .pf-replay-checkpoint-summary.breach {
    --pf-checkpoint-status: var(--red-light);
    --pf-checkpoint-status-bg: var(--red-bg);
}

body.pf-page .pf-replay-checkpoint-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

body.pf-page .pf-replay-checkpoint-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 1px solid color-mix(in srgb, var(--pf-checkpoint-status) 35%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--pf-checkpoint-status-bg) 70%, transparent);
    color: var(--pf-checkpoint-status);
}

body.pf-page .pf-replay-checkpoint-mark svg,
body.pf-page .pf-replay-checkpoint-mark i {
    width: 16px;
    height: 16px;
}

body.pf-page .pf-replay-checkpoint-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

body.pf-page .pf-replay-checkpoint-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

body.pf-page .pf-replay-checkpoint-title > strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: var(--pf-fs-body);
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-replay-checkpoint-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border: 1px solid color-mix(in srgb, var(--pf-checkpoint-status) 30%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--pf-checkpoint-status-bg) 55%, transparent);
    color: var(--pf-checkpoint-status);
    font-size: var(--pf-fs-chip);
    font-weight: 650;
    line-height: 1;
}

body.pf-page .pf-replay-checkpoint-main > span {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-meta);
    line-height: 1.4;
}

body.pf-page .pf-replay-checkpoint-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

body.pf-page .pf-replay-checkpoint-fact {
    display: grid;
    gap: 5px;
    min-width: 0;
    margin: 0;
    padding: 0 18px;
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-replay-checkpoint-fact dt,
body.pf-page .pf-replay-checkpoint-next small {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 600;
    line-height: 1.35;
}

body.pf-page .pf-replay-checkpoint-fact dd {
    overflow: hidden;
    margin: 0;
    color: var(--text-primary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-replay-checkpoint-next {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding-left: 20px;
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-replay-checkpoint-next > span:last-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

body.pf-page .pf-replay-checkpoint-next-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--app-border-soft);
    border-radius: 50%;
    color: var(--text-secondary);
}

body.pf-page .pf-replay-checkpoint-next-mark svg,
body.pf-page .pf-replay-checkpoint-next-mark i {
    width: 13px;
    height: 13px;
}

body.pf-page .pf-replay-checkpoint-next strong {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1060px) {
    body.pf-page .pf-replay-checkpoint-summary {
        grid-template-columns: minmax(0, 1fr) minmax(250px, auto);
        gap: 16px 24px;
    }

    body.pf-page .pf-replay-checkpoint-facts {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-top: 14px;
        border-top: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-replay-checkpoint-fact:first-child {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 767px) {
    body.pf-page .pf-replay-checkpoint-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    body.pf-page .pf-replay-checkpoint-facts,
    body.pf-page .pf-replay-checkpoint-next {
        grid-column: 1;
        grid-row: auto;
    }

    body.pf-page .pf-replay-checkpoint-next {
        padding: 14px 0 0;
        border-top: 1px solid var(--app-divider-muted);
        border-left: 0;
    }
}

@media (max-width: 480px) {
    body.pf-page .pf-replay-checkpoint-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.pf-page .pf-replay-checkpoint-fact {
        padding: 0 12px;
    }

    body.pf-page .pf-replay-checkpoint-fact:nth-child(3) {
        grid-column: 1 / -1;
        margin-top: 12px;
        padding: 12px 0 0;
        border-top: 1px solid var(--app-divider-muted);
        border-left: 0;
    }
}

/* Saved Replay timeline
 * Checkpoints are records in one timeline, not a stack of mini cards. The
 * header owns comparison; rows only expose selection, evidence, and opening. */
body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-card {
    display: grid;
    gap: 12px;
}

body.pf-page .pf-replay-history-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 16px 24px;
    margin: 0;
    padding: 0;
    border-bottom: 0;
}

body.pf-page .pf-replay-history-head > div:first-child {
    display: grid;
    gap: 6px;
    min-width: 0;
}

body.pf-page .pf-replay-history-head .pf-section-kicker {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.pf-page .pf-replay-history-head .pf-card-title {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--pf-fs-card-title);
    font-weight: 650;
    letter-spacing: -.015em;
    line-height: 1.25;
}

body.pf-page .pf-replay-history-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

body.pf-page .pf-replay-history-count {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 0;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: var(--pf-fs-chip);
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

body.pf-page .pf-replay-compare-action {
    min-width: 154px;
    min-height: 38px;
    justify-content: center;
    padding-inline: 13px;
    font-size: var(--pf-fs-chip);
    white-space: nowrap;
}

body.pf-page .pf-replay-compare-action:disabled {
    border-color: var(--app-border-soft);
    background: transparent;
    color: var(--text-tertiary);
    opacity: 1;
}

body.pf-page #pfReplayCompareSelected[hidden] {
    display: none !important;
}

body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-list {
    --pf-replay-history-columns: minmax(230px, 1.15fr) minmax(190px, .8fr) minmax(220px, .92fr) minmax(250px, auto);
    display: grid;
    min-width: 0;
    border: 1px solid var(--app-border-soft);
    border-radius: var(--app-radius-section);
    background: var(--app-surface-card);
    overflow: hidden;
}

body.pf-page .pf-replay-history-grid-head,
body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-row {
    display: grid;
    grid-template-columns: var(--pf-replay-history-columns);
    align-items: center;
    column-gap: 22px;
    min-width: 0;
}

body.pf-page .pf-replay-history-grid-head {
    min-height: 38px;
    padding: 0 16px;
    border-bottom: 1px solid var(--app-divider-muted);
    background: var(--app-surface-section-alt);
}

body.pf-page .pf-replay-history-grid-head > span {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: .06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.pf-page .pf-replay-history-grid-head > span:last-child {
    text-align: right;
}

body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-row {
    min-height: 76px;
    padding: 13px 16px;
    border: 0;
    border-bottom: 1px solid var(--app-divider-muted);
    background: transparent;
}

body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-row:last-child {
    border-bottom: 0;
}

body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-row[data-replay-current="true"] {
    background: var(--app-surface-section-alt);
}

body.pf-page .pf-replay-history-main,
body.pf-page .pf-replay-history-cell {
    display: grid;
    gap: 4px;
    min-width: 0;
}

body.pf-page .pf-replay-history-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

body.pf-page .pf-replay-history-main strong,
body.pf-page .pf-replay-history-cell strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 650;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .pf-replay-history-main > small,
body.pf-page .pf-replay-history-evidence > span {
    color: var(--text-tertiary);
    font-size: var(--pf-fs-meta);
    line-height: 1.4;
}

body.pf-page .pf-replay-history-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border: 1px solid color-mix(in srgb, var(--amber) 32%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--amber-bg) 55%, transparent);
    color: var(--amber);
    font-size: var(--pf-fs-chip);
    font-weight: 650;
    line-height: 1;
}

body.pf-page .pf-replay-history-status[data-status="pass"] {
    border-color: color-mix(in srgb, var(--app-action-primary-color) 32%, transparent);
    background: color-mix(in srgb, var(--app-action-primary-bg) 55%, transparent);
    color: var(--app-action-primary-color);
}

body.pf-page .pf-replay-history-status[data-status="breach"] {
    border-color: color-mix(in srgb, var(--red-light) 32%, transparent);
    background: color-mix(in srgb, var(--red-bg) 55%, transparent);
    color: var(--red-light);
}

body.pf-page .pf-replay-history-mobile-label {
    display: none;
}

body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
}

body.pf-page .pf-replay-compare-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    color: var(--text-secondary);
    font-size: var(--pf-fs-chip);
    font-weight: 600;
    cursor: pointer;
}

body.pf-page .pf-replay-compare-check input {
    appearance: none;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
    border: 1px solid var(--text-tertiary);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

body.pf-page .pf-replay-compare-check input:checked {
    border-color: var(--app-action-primary-color);
    background-color: var(--app-action-primary-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.2 6.2 2.2 2.2 5.4-5.2' fill='none' stroke='%23070b0a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px;
}

body.pf-page .pf-replay-compare-check input:focus-visible {
    outline: 1px solid var(--app-action-primary-border-hover);
    outline-offset: 2px;
}

body.pf-page .pf-replay-history-actions .app-action-btn {
    min-width: 104px;
    min-height: 36px;
    justify-content: center;
    padding: 7px 12px;
    font-size: var(--pf-fs-chip);
    white-space: nowrap;
}

body.pf-page .pf-replay-current-label,
body.pf-page .pf-replay-gated-label {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border: 1px solid var(--app-border-soft);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: var(--pf-fs-chip);
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

body.pf-page .pf-replay-current-label {
    border-color: var(--app-action-primary-border);
    color: var(--app-action-primary-color);
}

@media (max-width: 980px) {
    body.pf-page .pf-replay-history-grid-head {
        display: none;
    }

    body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 24px;
        padding: 16px;
    }

    body.pf-page .pf-replay-history-main,
    body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-actions {
        grid-column: 1 / -1;
    }

    body.pf-page .pf-replay-history-mobile-label {
        display: block;
        color: var(--text-tertiary);
        font-size: var(--pf-fs-kicker);
        font-weight: 650;
        letter-spacing: .06em;
        line-height: 1.2;
        text-transform: uppercase;
    }

    body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-actions {
        justify-content: flex-start;
        padding-top: 12px;
        border-top: 1px solid var(--app-divider-muted);
    }
}

@media (max-width: 620px) {
    body.pf-page .pf-replay-history-head {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    body.pf-page .pf-replay-history-tools {
        justify-content: space-between;
        width: 100%;
    }

    body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-row {
        grid-template-columns: minmax(0, 1fr);
    }

    body.pf-page .pf-replay-history-main,
    body.pf-page [data-replay-lifecycle-mode="timeline"] .pf-replay-history-actions {
        grid-column: 1;
    }
}

@media (max-width: 420px) {
    body.pf-page .pf-replay-history-tools {
        align-items: stretch;
        flex-direction: column;
    }

    body.pf-page .pf-replay-history-count {
        justify-content: center;
        align-self: flex-start;
    }

    body.pf-page .pf-replay-compare-action {
        width: 100%;
    }

    body.pf-page .pf-replay-compare-check {
        min-height: 40px;
    }
}

body.pf-page .pf-fit-card {
    overflow: hidden;
}

body.pf-page .pf-results-shell > .pf-report-section:last-child {
    padding: 0;
}

/* My Account owns one structural shell. The base stylesheet supplies the
 * account components; this layer alone composes the workspace around them. */
body.pf-page .pf-account-workspace {
    margin: 16px 0 18px;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

/* Empty/recovery states are rendered beside the workspace rather than inside
 * it, so they need the same section rhythm explicitly. */
body.pf-page .pf-empty-state {
    margin: 16px 0 18px;
}

body.pf-page .pf-account-workspace[hidden] {
    display: none !important;
}

body.pf-page .pf-account-rail-head,
body.pf-page .pf-account-rail-head strong,
body.pf-page .pf-account-fit-summary small {
    font-size: var(--pf-fs-chip);
}

body.pf-page .pf-account-layout.has-account-rail {
    column-gap: 18px;
}

body.pf-page .pf-account-rail,
body.pf-page .pf-account-main {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.pf-page .pf-account-main-loader[hidden],
body.pf-page .pf-account-main-content[hidden] {
    display: none !important;
}

body.pf-page .pf-account-main-loader {
    display: grid;
    gap: 10px;
    min-width: 0;
}

body.pf-page .pf-page-data-shell[hidden] {
    display: none !important;
}

body.pf-page .pf-page-data-shell {
    opacity: 1;
    transition: opacity 160ms ease;
}

body.pf-page .pf-page-data-shell.is-leaving {
    opacity: 0;
    pointer-events: none;
}

body.pf-page[data-pf-data-loading="true"] .pf-page-toolbar,
body.pf-page[data-pf-data-loading="true"] .pf-mode-switch {
    pointer-events: none;
}

body.pf-page[data-pf-data-loading="true"] .pf-mode-switch {
    opacity: .68;
}

body.pf-page[data-pf-data-loading="true"] #pfAccountWorkspace,
body.pf-page[data-pf-data-loading="true"] #pfCompareWorkspace,
body.pf-page[data-pf-data-loading="true"] #pfEmptyState,
body.pf-page[data-pf-data-loading="true"] #pfPreviewValueCard,
body.pf-page[data-pf-data-loading="true"] #pfResultsWrap {
    display: none !important;
}

body.pf-page .pf-page-data-shell-layout {
    min-height: 610px;
}

body.pf-page .pf-page-data-shell-rail {
    display: grid;
    align-content: start;
    gap: 10px;
    padding-right: 18px;
    border-right: 0;
}

body.pf-page .pf-page-data-shell-rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
}

body.pf-page .pf-page-data-shell-line,
body.pf-page .pf-page-data-shell-dot,
body.pf-page .pf-page-data-shell-account,
body.pf-page .pf-page-data-shell-add {
    display: block;
    border-radius: 8px;
    background: var(--app-surface-control);
    animation: pf-account-main-loader-pulse 1.15s ease-in-out infinite;
}

body.pf-page .pf-page-data-shell-line--label {
    width: 96px;
    height: 10px;
}

body.pf-page .pf-page-data-shell-dot {
    width: 22px;
    height: 22px;
    border-radius: 999px;
}

body.pf-page .pf-page-data-shell-account {
    position: relative;
    height: 62px;
    overflow: hidden;
    border: 0;
    background: var(--app-surface-section-alt);
}

body.pf-page .pf-page-data-shell-account::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 12px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--app-surface-control);
}

body.pf-page .pf-page-data-shell-account::after {
    content: "";
    position: absolute;
    top: 18px;
    right: 16px;
    left: 58px;
    height: 8px;
    max-width: 104px;
    border-radius: 999px;
    background: var(--app-surface-control);
    box-shadow: 0 18px 0 -1px var(--app-surface-control);
}

body.pf-page .pf-page-data-shell-add {
    height: 44px;
    border: 1px dashed var(--app-border-muted);
    background: transparent;
}

body.pf-page .pf-account-main-loader-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 74px;
    padding-bottom: 16px;
}

body.pf-page .pf-account-main-loader-logo,
body.pf-page .pf-account-main-loader-line,
body.pf-page .pf-account-main-loader-actions > span,
body.pf-page .pf-account-main-loader-panel,
body.pf-page .pf-account-main-loader-section {
    display: block;
    border-radius: 8px;
    background: var(--app-surface-control);
    animation: pf-account-main-loader-pulse 1.15s ease-in-out infinite;
}

body.pf-page .pf-account-main-loader-logo {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 14px;
}

body.pf-page .pf-account-main-loader-copy {
    display: grid;
    flex: 1 1 auto;
    gap: 9px;
    min-width: 0;
}

body.pf-page .pf-account-main-loader-line--title {
    width: min(280px, 54%);
    height: 18px;
}

body.pf-page .pf-account-main-loader-line--meta {
    width: min(190px, 38%);
    height: 9px;
}

body.pf-page .pf-account-main-loader-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

body.pf-page .pf-account-main-loader-actions > span {
    width: 132px;
    height: 42px;
}

body.pf-page .pf-account-main-loader-actions > span:last-child {
    width: 154px;
}

body.pf-page .pf-account-main-loader-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 10px;
}

body.pf-page .pf-account-main-loader-panel,
body.pf-page .pf-account-main-loader-section {
    min-width: 0;
    height: 242px;
    border: 1px solid var(--app-border-muted);
    background: var(--app-surface-card);
}

body.pf-page .pf-account-main-loader-section {
    height: 154px;
}

body.pf-page .pf-account-main-loader-section--compact {
    height: 136px;
}

/* The initial page shell reserves the final workspace geometry, but should
 * read as a quiet loading state rather than a stack of empty cards. */
body.pf-page .pf-page-data-shell .pf-account-main-loader-panel,
body.pf-page .pf-page-data-shell .pf-account-main-loader-section {
    position: relative;
    overflow: hidden;
    height: 210px;
    border: 0;
    background: var(--app-surface-section-alt);
}

body.pf-page .pf-page-data-shell .pf-account-main-loader-section {
    height: 126px;
}

body.pf-page .pf-page-data-shell .pf-account-main-loader-section--compact {
    height: 110px;
}

body.pf-page .pf-page-data-shell .pf-account-main-loader-panel::before,
body.pf-page .pf-page-data-shell .pf-account-main-loader-section::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 18px;
    width: min(118px, 34%);
    height: 9px;
    border-radius: 999px;
    background: var(--app-surface-control);
    box-shadow: 0 25px 0 -1px var(--app-surface-control);
}

body.pf-page .pf-page-data-shell .pf-account-main-loader-panel::after,
body.pf-page .pf-page-data-shell .pf-account-main-loader-section::after {
    content: "";
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    height: 6px;
    border-radius: 999px;
    background: var(--app-surface-control);
}

@keyframes pf-account-main-loader-pulse {
    0%, 100% { opacity: .58; }
    50% { opacity: .9; }
}

@media (prefers-reduced-motion: reduce) {
    body.pf-page .pf-page-data-shell,
    body.pf-page .pf-page-data-shell-line,
    body.pf-page .pf-page-data-shell-dot,
    body.pf-page .pf-page-data-shell-account,
    body.pf-page .pf-page-data-shell-add,
    body.pf-page .pf-account-main-loader-logo,
    body.pf-page .pf-account-main-loader-line,
    body.pf-page .pf-account-main-loader-actions > span,
    body.pf-page .pf-account-main-loader-panel,
    body.pf-page .pf-account-main-loader-section {
        animation: none;
        transition: none;
    }
}

/* Light-theme semantic contract.
 * Dark surfaces use the brighter mint/red/amber tokens. On white surfaces the
 * same colors lose contrast, so text and small state icons switch to the
 * established accessible app colors while fills remain subtle. */
:is(html.light, html[data-theme="light"]) body.pf-page {
    --pf-accent-text: var(--app-action-primary-color, #0f766e);
    --pf-profit-text: #15803d;
    --pf-negative-text: var(--red, #dc2626);
    --pf-warning-text: #a16207;
}

:is(html.light, html[data-theme="light"]) body.pf-page .pf-setup-command-title h2 > svg,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-setup-command-title h2 > i,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-setup-source-note > svg,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-setup-reviewed > svg,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-snapshot-bar > span svg,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-snapshot-bar > span i,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-snapshot-bar > a,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-phase-step.is-active .pf-phase-step-copy small,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-setup-command-fact--status[data-state="pass"] > svg,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-setup-command-fact--status[data-state="pass"] > span > strong {
    color: var(--pf-accent-text);
}

:is(html.light, html[data-theme="light"]) body.pf-page .pf-curve-meta-value.positive,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-trade-ledger-pnl.positive strong,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-insights-alert-icon.pass {
    color: var(--pf-profit-text);
}

:is(html.light, html[data-theme="light"]) body.pf-page .pf-setup-command-fact--status[data-state="breach"] > svg,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-setup-command-fact--status[data-state="breach"] > span > strong,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-verdict-card[data-outcome="breach"] .pf-verdict-mark,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-verdict-card[data-outcome="breach"] .pf-verdict-state,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-curve-meta-value.negative,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-curve-state.fail,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-check-icon.risk,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-check-metric.negative strong,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-stress-row.has-risk .pf-stress-value,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-fit-profile-lead.fail .pf-fit-profile-lead-icon,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-fit-outcome.fail > strong,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-insights-alert-icon.fail,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-trade-side--short,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-trade-ledger-pnl.negative strong,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-trade-result--loss,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-replay-history-status[data-status="breach"],
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-source[data-state="error"] #pfAccountSyncState,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-flow-state[data-state="error"] {
    color: var(--pf-negative-text);
}

:is(html.light, html[data-theme="light"]) body.pf-page .pf-setup-command-fact--status[data-state="tracking"] > svg,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-setup-command-fact--status[data-state="tracking"] > span > strong,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-curve-meta-value.warning,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-fit-profile-lead.tracking .pf-fit-profile-lead-icon,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-fit-profile-row.warning .pf-fit-profile-icon,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-fit-cell.warning > strong,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-fit-outcome.tracking > strong,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-insights-alert-icon.warning,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-source[data-state="stale"] #pfAccountSyncState,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-flow-state[data-state="stale"] {
    color: var(--pf-warning-text);
}

:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-source[data-state="working"] #pfAccountSyncState,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-flow-state[data-state="working"] {
    color: var(--pf-accent-text);
}

:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-flow-state[data-state="error"] > span,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-flow-state[data-state="breach"] > span {
    background: var(--pf-negative-text);
}

:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-flow-state[data-state="stale"] > span {
    background: var(--pf-warning-text);
}

:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-flow-state[data-state="working"] > span {
    background: var(--pf-accent-text);
}

:is(html.light, html[data-theme="light"]) body.pf-page .pf-fit-manual-summary-action {
    color: var(--pf-accent-text);
}

:is(html.light, html[data-theme="light"]) body.pf-page .pf-fit-manual-coverage > summary:hover .pf-fit-manual-summary-action {
    color: var(--app-action-primary-color-hover);
}

/* Skeletons must remain visible against the light page without becoming a
 * second card system. Lines use a neutral fill; panel placeholders keep the
 * same geometry and a slightly stronger existing border. */
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-main-loader-logo,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-main-loader-line,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-main-loader-actions > span {
    background: #e9ecef;
}

:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-main-loader-panel,
:is(html.light, html[data-theme="light"]) body.pf-page .pf-account-main-loader-section {
    border-color: var(--app-border-default);
    background: var(--app-surface-section-alt);
}

body.pf-page .pf-account-snapshot-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    padding: 14px 0 0;
    border: 0;
    border-top: 1px solid var(--app-border-muted);
    border-radius: 0;
    background: transparent;
}

body.pf-page .pf-account-snapshot-bar > span {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 2px 8px;
    min-width: 0;
}

body.pf-page .pf-account-snapshot-bar > span svg,
body.pf-page .pf-account-snapshot-bar > span i {
    grid-row: 1 / 3;
    width: 16px;
    height: 16px;
    color: var(--accent-secondary);
}

body.pf-page .pf-account-snapshot-bar strong {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.25;
}

body.pf-page .pf-account-snapshot-bar small {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
}

body.pf-page .pf-account-snapshot-bar > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--accent-secondary);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

body.pf-page .pf-account-snapshot-bar > a:hover {
    color: var(--text-primary);
}

body.pf-page .pf-account-snapshot-bar > a:focus-visible {
    outline: 1px solid var(--app-action-primary-border-hover);
    outline-offset: 3px;
}

body.pf-page .pf-account-snapshot-bar > a svg,
body.pf-page .pf-account-snapshot-bar > a i {
    width: 14px;
    height: 14px;
}

body.pf-page .pf-operations-card {
    margin: 12px 0 0;
    padding: 20px;
    border: 1px solid var(--app-border-muted);
    border-radius: 12px;
    background: var(--app-surface-card);
}

body.pf-page #pfOperationalCard {
    margin-bottom: 12px;
}

body.pf-page .pf-operations-card[hidden] {
    display: none !important;
}

body.pf-page .pf-operations-head,
body.pf-page .pf-operations-facts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

body.pf-page .pf-operations-head h2,
body.pf-page .pf-operations-head h3 {
    margin: 4px 0 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 680;
    letter-spacing: -.02em;
}

body.pf-page .pf-operations-stage {
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid var(--app-action-primary-border);
    border-radius: 999px;
    color: var(--accent-secondary);
    background: var(--app-action-primary-bg);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.pf-page .pf-operations-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
    border-block: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-operations-grid > span {
    display: grid;
    align-content: start;
    gap: 5px;
    min-width: 0;
    padding: 15px 16px;
}

body.pf-page .pf-operations-grid > span:first-child {
    padding-left: 0;
}

body.pf-page .pf-operations-grid > span:last-child {
    padding-right: 0;
}

body.pf-page .pf-operations-grid > span + span {
    border-left: 1px solid var(--app-divider-muted);
}

body.pf-page .pf-operations-grid small,
body.pf-page .pf-operations-grid em {
    color: var(--text-tertiary);
    font-size: 11px;
    font-style: normal;
    line-height: 1.35;
}

body.pf-page .pf-operations-grid small {
    font-weight: 650;
    letter-spacing: .05em;
    text-transform: uppercase;
}

body.pf-page .pf-operations-grid strong {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 680;
    line-height: 1.3;
}

body.pf-page .pf-operations-facts {
    justify-content: flex-start;
    margin-top: 13px;
    color: var(--text-secondary);
    font-size: 12px;
}

body.pf-page .pf-operations-facts > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

body.pf-page .pf-operations-facts > span + span::before {
    width: 3px;
    height: 3px;
    margin-right: 9px;
    border-radius: 999px;
    background: var(--text-tertiary);
    content: "";
}

body.pf-page .pf-operations-card > p {
    margin: 10px 0 0;
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 900px) {
    body.pf-page .pf-operations-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.pf-page .pf-operations-grid > span,
    body.pf-page .pf-operations-grid > span:first-child,
    body.pf-page .pf-operations-grid > span:last-child {
        padding: 14px;
    }

    body.pf-page .pf-operations-grid > span:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

    body.pf-page .pf-operations-grid > span:nth-child(n + 3) {
        border-top: 1px solid var(--app-divider-muted);
    }
}

@media (max-width: 560px) {
    body.pf-page .pf-operations-card {
        padding: 16px;
    }

    body.pf-page .pf-operations-head,
    body.pf-page .pf-operations-facts {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    body.pf-page .pf-operations-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body.pf-page .pf-operations-grid > span,
    body.pf-page .pf-operations-grid > span:first-child,
    body.pf-page .pf-operations-grid > span:last-child,
    body.pf-page .pf-operations-grid > span:nth-child(odd) {
        padding: 13px 0;
        border-left: 0;
    }

    body.pf-page .pf-operations-grid > span + span {
        border-top: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-operations-facts > span + span::before {
        display: none;
    }
}

html.light body.pf-page .pf-account-snapshot-bar > a,
html[data-theme="light"] body.pf-page .pf-account-snapshot-bar > a {
    color: var(--app-action-primary-color, #0f766e);
}

@media (max-width: 1280px) {
    body.pf-page .pf-report-layout--primary {
        grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr);
    }

    body.pf-page .pf-report-layout--primary .pf-verdict-card {
        grid-template-columns: minmax(320px, .9fr) minmax(440px, 1.1fr);
    }

    body.pf-page .pf-verdict-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.pf-page .pf-verdict-kpi:nth-child(n + 3) {
        border-top: 1px solid var(--app-divider-muted);
    }
}

@media (max-width: 1400px) {
    body.pf-page .pf-account-main-loader-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1060px) {
    body.pf-page .pf-account-layout.has-account-rail {
        gap: 12px;
    }

    body.pf-page .pf-report-layout--primary {
        grid-template-columns: minmax(0, 1fr);
    }

    body.pf-page .pf-report-layout--primary .pf-verdict-card,
    body.pf-page .pf-report-layout--primary .pf-curve-card,
    body.pf-page .pf-report-layout--primary .pf-checks-card,
    body.pf-page .pf-report-layout--primary .pf-forecast-card,
    body.pf-page .pf-report-layout--primary .pf-stress-card {
        grid-column: 1;
    }

    body.pf-page .pf-report-layout--primary .pf-verdict-card {
        grid-template-columns: minmax(0, 1fr);
        grid-row: 1;
    }

    body.pf-page .pf-report-layout--primary .pf-curve-card {
        grid-template-rows: auto 300px auto;
        grid-row: 2;
    }

    body.pf-page .pf-report-layout--primary .pf-checks-card {
        grid-row: 3;
    }

    body.pf-page .pf-report-layout--primary .pf-forecast-card {
        grid-row: 4;
    }

    body.pf-page .pf-report-layout--primary .pf-stress-card {
        grid-row: 5;
    }

    body.pf-page .pf-verdict-kpis {
        border-top: 1px solid var(--app-divider-muted);
        border-left: 0;
    }

    body.pf-page .pf-report-layout--primary .pf-curve-card > .pf-chart {
        min-height: 300px;
        height: 300px;
    }

    body.pf-page .pf-insights-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    body.pf-page .pf-insights-health {
        margin: 20px 0 0;
        padding: 20px 0 0;
        border-top: 1px solid var(--app-divider-muted);
        border-left: 0;
    }
}

@media (max-width: 900px) {
    body.pf-page .pf-account-main-loader-identity {
        align-items: flex-start;
        flex-wrap: wrap;
        min-height: 0;
    }

    body.pf-page .pf-account-main-loader-actions {
        width: 100%;
        margin-left: 0;
    }

    body.pf-page .pf-account-main-loader-actions > span {
        flex: 1 1 0;
        width: auto;
    }
}

@media (max-width: 767px) {
    body.pf-page .pf-page-data-shell-layout {
        min-height: 580px;
    }

    body.pf-page .pf-page-data-shell-rail {
        display: grid !important;
        grid-template-columns: 1fr auto;
        gap: 8px;
        padding: 0 0 12px;
        border-right: 0;
        border-bottom: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-page-data-shell-rail-head,
    body.pf-page .pf-page-data-shell-account:nth-of-type(2) {
        display: none;
    }

    body.pf-page .pf-page-data-shell-account,
    body.pf-page .pf-page-data-shell-add {
        height: 46px;
    }

    body.pf-page .pf-page-data-shell-add {
        width: 46px;
    }

    body.pf-page .pf-account-workspace {
        margin-top: 12px;
    }

    body.pf-page .pf-empty-state {
        margin-top: 12px;
    }

    body.pf-page .pf-account-main-loader-panel {
        height: 220px;
    }

    body.pf-page .pf-page-data-shell .pf-account-main-loader-panel {
        height: 190px;
    }

    body.pf-page .pf-account-snapshot-bar {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding-top: 12px;
    }

    body.pf-page .pf-intro-card.app-page-command-content {
        padding-top: 8px !important;
    }

    body.pf-page .pf-verdict-lead {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 11px;
        min-height: 0;
        padding: 14px;
    }

    body.pf-page .pf-verdict-mark {
        margin-top: 0;
    }

    body.pf-page .pf-verdict-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.pf-page .pf-verdict-kpi {
        min-height: 72px;
        padding: 11px 14px;
        border-right: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-verdict-kpi:nth-child(2n) {
        border-right: 0;
    }

    body.pf-page .pf-verdict-kpi:nth-child(n + 3) {
        border-top: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-report-layout--primary .pf-report-block {
        padding: 14px;
    }

    body.pf-page .pf-report-layout--primary .pf-verdict-card {
        padding: 0;
    }

    body.pf-page .pf-report-layout--primary .pf-curve-card > .pf-chart {
        min-height: 248px;
        height: 248px;
    }

    body.pf-page .pf-report-layout--primary .pf-curve-card {
        grid-template-rows: auto 248px auto;
    }

    body.pf-page .pf-curve-card .apexcharts-canvas,
    body.pf-page .pf-curve-card .apexcharts-svg {
        max-width: 100%;
    }

    body.pf-page .pf-report-layout--primary .pf-curve-card > .pf-card-head {
        align-items: flex-start;
    }

    body.pf-page .pf-report-layout--primary .pf-curve-card > .pf-curve-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.pf-page .pf-curve-heading {
        display: grid;
        gap: 12px;
    }

    body.pf-page .pf-curve-legend {
        gap: 8px 13px;
    }

    body.pf-page .pf-curve-meta-item:nth-child(2),
    body.pf-page .pf-curve-meta-item:nth-child(4),
    body.pf-page .pf-curve-meta-item:last-child {
        padding-right: 0;
        border-right: 0;
    }

    body.pf-page .pf-curve-meta-item:nth-child(n + 3) {
        border-top: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-curve-meta-item:nth-child(odd) {
        padding-left: 0;
    }

    body.pf-page .pf-curve-meta-item:nth-child(5):last-child {
        grid-column: 1 / -1;
    }

    body.pf-page .pf-report-layout--primary .pf-forecast-card {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-top: 1px solid var(--app-divider-muted);
        border-right: 0;
        border-bottom: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-strip .pf-monte-card,
    body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-strip .pf-monte-card:first-child,
    body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-strip .pf-monte-card:last-child {
        padding: 10px;
        border-right: 1px solid var(--app-divider-muted);
        border-bottom: 0;
    }

    body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-strip .pf-monte-card:first-child {
        padding-left: 0;
    }

    body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-strip .pf-monte-card:last-child {
        padding-right: 0;
        border-right: 0;
    }

    body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-forecast-legend {
        margin-top: 12px;
    }

    body.pf-page .pf-forecast-legend .pf-forecast-boundary {
        flex-basis: 100%;
        margin-left: 0;
        white-space: normal;
    }

    body.pf-page .pf-report-layout--primary .pf-forecast-card > .pf-chart {
        min-height: 240px;
        height: 240px;
    }

    body.pf-page .pf-stress-columns,
    body.pf-page .pf-stress-row {
        grid-template-columns: 88px minmax(0, 1fr) 44px;
        gap: 10px;
    }

    body.pf-page .pf-stress-title,
    body.pf-page .pf-stress-value {
        font-size: 12px;
    }

    body.pf-page .pf-stress-meta,
    body.pf-page .pf-stress-axis {
        font-size: var(--pf-fs-chip);
    }

    body.pf-page .pf-stress-legend {
        gap: 8px 16px;
    }

    body.pf-page .pf-replay-ledger-head {
        padding: 14px;
    }

    body.pf-page .pf-replay-ledger {
        --pf-replay-ledger-inline: 14px;
    }

    body.pf-page .pf-trade-ledger-table {
        width: 760px;
        min-width: 760px;
        --pf-trade-ledger-columns: 126px 150px 76px 158px 124px 84px;
    }

    body.pf-page .pf-trade-ledger-table th,
    body.pf-page .pf-trade-ledger-row td {
        padding-right: var(--pf-replay-ledger-inline);
        padding-left: var(--pf-replay-ledger-inline);
    }

    body.pf-page .pf-trade-ledger-row {
        min-height: 64px;
    }

    body.pf-page .pf-secondary-tabs {
        grid-template-columns: minmax(0, 1fr);
    }

    body.pf-page .pf-secondary-summary {
        min-height: 58px;
        padding: 12px 14px;
        border-right: 0;
        border-bottom: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-secondary-summary:last-child {
        border-bottom: 0;
    }

    body.pf-page .pf-secondary-summary.is-active {
        border-bottom: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-insights-layout {
        padding: 16px;
    }

    body.pf-page .pf-insights-action-list {
        grid-template-columns: minmax(0, 1fr);
        border-bottom: 0;
    }

    body.pf-page .pf-insights-action,
    body.pf-page .pf-insights-action:first-child,
    body.pf-page .pf-insights-action:last-child {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr);
        gap: 12px;
        padding: 13px 0;
        border-left: 0;
        border-bottom: 1px solid var(--app-divider-muted);
    }

    body.pf-page .pf-insights-action:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    body.pf-page .pf-insights-action-index {
        margin-bottom: 0;
        padding-top: 2px;
    }

    body.pf-page .pf-insights-alert {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    body.pf-page .pf-insights-alert-value {
        margin-left: 33px;
        color: var(--text-secondary);
        font-size: var(--pf-fs-support);
        white-space: normal;
    }

    body.pf-page .pf-insights-coach {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        gap: 14px;
        padding: 16px;
    }

    body.pf-page .pf-insights-coach-btn {
        width: 100%;
    }

    body.pf-page .pf-insights-action-copy,
    body.pf-page .pf-insights-alert-detail,
    body.pf-page .pf-insights-coach p {
        line-height: 1.5;
    }
}

/* Result-first chrome
 *
 * Keep the firm analysis visible once a valid replay exists. These rules only
 * compose Prop Tracker's own banner, mobile header, and account picker; shared
 * app and Journal primitives remain untouched. */
body.pf-page .demo-banner-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding-block: 9px;
}

body.pf-page .demo-banner-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

body.pf-page .demo-banner-text > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.pf-page .demo-banner-cta {
    min-height: 36px;
    padding-inline: 14px;
}

body.pf-page .pf-qa-statebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 58px;
    padding: 9px clamp(16px, 2.2vw, 32px);
    border-bottom: 1px solid var(--app-border-muted);
    background: var(--app-surface-section-alt);
}

body.pf-page .pf-qa-statebar-copy,
body.pf-page .pf-qa-statebar-control {
    display: grid;
    gap: 2px;
}

body.pf-page .pf-qa-statebar-copy > span,
body.pf-page .pf-qa-statebar-control > span {
    color: var(--text-muted);
    font-size: var(--pf-fs-kicker);
    font-weight: 650;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

body.pf-page .pf-qa-statebar-copy > strong {
    color: var(--text-primary);
    font-size: var(--pf-fs-body-sm);
    font-weight: 600;
}

body.pf-page .pf-qa-statebar-control {
    position: relative;
    min-width: min(360px, 46vw);
}

body.pf-page .pf-qa-statebar-control select {
    width: 100%;
    min-height: 34px;
    padding: 0 36px 0 11px;
    border: 1px solid var(--app-border-default);
    border-radius: 8px;
    background: var(--app-surface-control);
    color: var(--text-primary);
    font: inherit;
    font-size: var(--pf-fs-body-sm);
    appearance: none;
}

body.pf-page .pf-qa-statebar-control > svg,
body.pf-page .pf-qa-statebar-control > i {
    position: absolute;
    right: 11px;
    bottom: 9px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

body.pf-page .pf-account-mobile-picker-head,
body.pf-page .pf-account-mobile-add {
    display: none;
}

@media (max-width: 900px) {
    body.pf-page .demo-banner-content {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        padding: 8px 12px;
    }

    body.pf-page .demo-banner-text {
        display: grid;
        gap: 1px;
        line-height: 1.25;
    }

    body.pf-page .demo-banner-text strong,
    body.pf-page .demo-banner-text > span {
        font-size: 12px;
        line-height: 1.3;
    }

    body.pf-page .demo-banner-cta {
        width: auto;
        min-height: 36px;
        margin: 0;
        padding-inline: 12px;
    }

    body.pf-page .pf-qa-statebar {
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
    }

    body.pf-page .pf-qa-statebar-copy {
        display: none;
    }

    body.pf-page .pf-qa-statebar-control {
        width: 100%;
        min-width: 0;
    }

    body.pf-page .pf-account-layout.has-account-rail .pf-account-rail {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    body.pf-page .pf-account-mobile-picker:not([hidden]) {
        display: grid;
        grid-column: 1;
        gap: 8px;
    }

    body.pf-page .pf-account-mobile-picker-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    body.pf-page .pf-account-mobile-picker-head > label {
        color: var(--text-tertiary);
        font-size: var(--pf-fs-kicker);
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    body.pf-page .pf-account-mobile-add {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        color: var(--text-secondary);
        font-size: 12px;
        font-weight: 650;
        text-decoration: none;
    }

    body.pf-page .pf-account-mobile-add:is(:hover, :focus-visible) {
        color: var(--app-action-primary-color);
    }

    body.pf-page .pf-account-mobile-add svg,
    body.pf-page .pf-account-mobile-add i {
        width: 14px;
        height: 14px;
    }

    body.pf-page .pf-account-layout.has-account-rail .pf-account-rail > .pf-account-rail-add {
        display: none;
    }
}

/* Keep the visibility control independent from optional toolbar actions.
 * Demo hides Sync, so a flexible width here used to expose a shared grid bug:
 * the eye kept its height but collapsed into the remaining narrow track. */
body.pf-page .pf-page-header.app-page-header--workspace
    .pf-page-toolbar.app-toolbar > .app-action-btn.creator-mode-toggle {
    box-sizing: border-box;
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    flex: 0 0 46px;
    justify-self: end;
    aspect-ratio: 1;
}

@media (min-width: 768px) and (max-width: 1100px) {
    body.pf-page .pf-page-header.app-page-header--workspace {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 8px;
        padding-block: 10px;
    }

    body.pf-page .pf-page-header.app-page-header--workspace .app-page-title-group {
        grid-column: 1;
        width: auto;
        margin: 0;
    }

    body.pf-page .pf-page-header.app-page-header--workspace .pf-page-toolbar.app-toolbar {
        display: contents;
    }

    body.pf-page .pf-page-header.app-page-header--workspace .pf-page-toolbar .pf-mode-switch {
        grid-column: 2;
        width: 100%;
    }

    body.pf-page .pf-page-header.app-page-header--workspace #syncBtn {
        grid-column: 3;
        width: 46px;
        min-width: 46px;
        max-width: 46px;
        padding: 0;
    }

    body.pf-page .pf-page-header.app-page-header--workspace #syncBtn > span {
        display: none;
    }

    body.pf-page .pf-page-header.app-page-header--workspace .creator-mode-toggle {
        grid-column: 4;
    }
}

@media (max-width: 767px) {
    body.pf-page .pf-page-header.app-page-header--workspace {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        padding: 6px 0 12px;
    }

    body.pf-page .pf-page-header.app-page-header--workspace .app-page-title-group,
    body.pf-page.has-sidebar .pf-page-header.app-page-header--workspace .app-page-title-group {
        grid-column: 1;
        grid-row: 1;
        justify-content: flex-start;
        width: auto;
        min-height: 44px;
        margin: 0;
        padding-left: 0;
    }

    body.pf-page.has-sidebar .pf-page-header.app-page-header--workspace .app-page-title-group {
        padding-left: 52px;
    }

    /* The Prop Tracker title row already shares the mobile menu's 44px
     * geometry. The global sidebar optical lift would move its glyphs 6px
     * above the button center. */
    body.pf-page.has-sidebar .pf-page-header.app-page-header--workspace .app-page-title {
        transform: none;
    }

    body.pf-page .pf-page-header.app-page-header--workspace .pf-page-toolbar.app-toolbar {
        display: contents;
    }

    body.pf-page .pf-page-header.app-page-header--workspace .pf-page-toolbar .pf-mode-switch {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }

    body.pf-page .pf-page-header.app-page-header--workspace #syncBtn,
    body.pf-page .pf-page-header.app-page-header--workspace
        .pf-page-toolbar.app-toolbar > .app-action-btn.creator-mode-toggle {
        display: none !important;
    }
}
