#pfSwitch{display:inline-flex;border:1px solid var(--line,#e5e8ec);border-radius:8px;padding:3px;gap:3px;margin:0 0 20px;background:var(--card,#fff)}#pfSwitch button{border:0;padding:10px 18px;background:transparent;color:var(--ink,#1a2230);font:600 14px 'Microsoft YaHei',sans-serif;border-radius:5px;cursor:pointer}#pfSwitch button[aria-pressed=true]{background:var(--ink,#16335b);color:var(--card,#fff)}
#pfRoot{font:13px/1.6 'Microsoft YaHei','微软雅黑',sans-serif;color:var(--ink,#1a2230);--pf-line:var(--line,#e5e8ec);--pf-card:var(--card,#fff)}#pfRoot *{box-sizing:border-box}#pfRoot [hidden]{display:none!important}#pfRoot h1{font-size:24px;margin:0}#pfRoot h2{font-size:16px;margin:0 0 12px}#pfRoot p{margin:5px 0;color:var(--muted,#687588)}#pfRoot button,#pfRoot input,#pfRoot select{font:inherit;color:inherit;background:var(--pf-card);border:1px solid var(--pf-line);border-radius:5px;padding:7px 10px}#pfRoot button{cursor:pointer;box-shadow:none}#pfRoot button:hover{border-color:var(--action-focus)}#pfRoot button:disabled{opacity:.45;cursor:not-allowed}#pfRoot :focus-visible{outline:2px solid var(--action-focus);outline-offset:3px}#pfRoot .pf-primary{background:var(--action-bg);color:var(--action-ink);border-color:var(--action-bg)}#pfRoot .pf-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}#pfRoot .pf-between{justify-content:space-between}#pfRoot .pf-steps{display:flex;gap:24px;border-bottom:1px solid var(--pf-line);margin:22px 0}#pfRoot .pf-steps button{border:0;border-radius:0;padding:12px 2px}#pfRoot .pf-steps button[aria-current=true]{border-bottom:2px solid #e8832b;font-weight:bold}#pfRoot .pf-grid{display:grid;grid-template-columns:minmax(260px,1fr) minmax(400px,1.6fr);gap:16px}#pfRoot .pf-box{border:1px solid var(--pf-line);border-radius:8px;padding:18px;min-width:0;background:var(--pf-card)}#pfRoot .pf-list{max-height:280px;overflow:auto}#pfRoot .pf-product{display:grid;grid-template-columns:100px 1fr auto;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid var(--pf-line)}#pfRoot code{font:12px monospace;color:var(--muted,#687588)}#pfRoot .pf-actions{position:sticky;bottom:70px;display:flex;justify-content:flex-end;gap:10px;background:var(--pf-card);padding:14px 0;border-top:1px solid var(--pf-line);margin-top:20px;z-index:5}#pfRoot .pf-error{color:var(--danger,#b94122);padding:10px 0;white-space:pre-wrap}#pfRoot .pf-note{border-left:2px solid #e8832b;padding-left:12px;margin:12px 0}#pfRoot table{width:100%;border-collapse:collapse;font-size:12px}#pfRoot td,#pfRoot th{padding:8px;border-bottom:1px solid var(--pf-line);text-align:left;white-space:nowrap}#pfRoot input[type=number]{width:76px}#pfRoot input[type=month]{width:145px}#pfRoot .pf-scroll{overflow:auto;max-height:350px}#pfRoot .pf-chart{width:100%;height:310px;touch-action:none}#pfRoot .pf-family{padding:10px 0;border-bottom:1px solid var(--pf-line)}#pfRoot .pf-muted{color:var(--muted,#687588)}#pfRoot dialog{width:min(750px,94vw);max-height:85vh;overflow:auto;background:var(--pf-card);color:inherit;border:1px solid var(--pf-line);border-radius:10px;padding:24px}#pfRoot dialog::backdrop{background:#162b4655}#pfRoot .pf-dialog-title{cursor:move}#pfRoot .pf-numeric{display:flex;align-items:center;gap:6px}#pfRoot input[type=checkbox]{accent-color:var(--action-bg)}#pfRoot .pf-chips{display:flex;gap:8px;overflow:auto;padding:10px 0}#pfRoot .pf-chips button[aria-pressed=true]{border-color:var(--action-focus);color:var(--ink);font-weight:bold}#pfRoot .pf-empty{padding:35px;text-align:center;color:var(--muted)}@media(max-width:760px){#pfRoot .pf-grid{grid-template-columns:1fr}#pfRoot .pf-actions{bottom:70px}#pfSwitch button{padding:10px}#pfRoot .pf-product{grid-template-columns:85px 1fr auto}}
main.pf-mode > :not(#pfSwitch):not(#pfRoot):not(#planNavigation){display:none!important}body:has(main.pf-mode) #batchbar{display:none!important}

#pfRoot .pf-text-action{border:0;background:transparent;padding:2px 4px;color:var(--muted,#687588);text-decoration:underline;text-underline-offset:3px}#pfRoot .pf-more{position:relative}#pfRoot .pf-more>summary{cursor:pointer;padding:7px 4px;color:var(--muted,#687588)}#pfRoot .pf-more>div{position:absolute;right:0;top:100%;z-index:20;min-width:150px;padding:6px;background:var(--pf-card);border:1px solid var(--pf-line);border-radius:6px}#pfRoot .pf-more button{display:block;width:100%;text-align:left;border:0}#pfRoot .pf-detection{margin:12px 0}#pfRoot .pf-detection>summary{cursor:pointer;color:var(--muted,#687588);width:fit-content}#pfRoot .pf-detection[open]>.pf-row{margin-top:10px}
/* Task workspace: scoped to product family. Cleaning keeps its own layout. */
#pfRoot[hidden]{display:none!important}#pfSwitch{position:relative;z-index:2;scroll-margin-top:76px}#pfRoot{background:var(--card,#fff);border:1px solid var(--line,#e5e8ec);border-radius:10px;padding:24px;min-height:620px}#pfRoot .pf-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:0 0 20px;background:transparent;border:0;position:static;height:auto}#pfRoot .pf-heading h1{color:var(--ink,#16335b);margin-bottom:4px}#pfRoot .pf-heading .pf-row{justify-content:flex-end}#pfRoot .pf-workspace{display:grid;grid-template-columns:210px minmax(0,1fr);min-height:520px;border-top:1px solid var(--pf-line)}#pfRoot .pf-rail{border-right:1px solid var(--pf-line);padding:20px 18px 0 0;display:flex;flex-direction:column;gap:8px}#pfRoot .pf-rail-title{display:flex;justify-content:space-between;align-items:center;font-weight:600;margin-bottom:12px}#pfRoot .pf-rail-title small{font-weight:400;color:var(--muted)}#pfRoot .pf-rail-item{border:0;text-align:left;background:transparent;padding:12px;display:flex;flex-direction:column;gap:5px}#pfRoot .pf-rail-item strong{font-weight:500}#pfRoot .pf-rail-item small{color:var(--muted,#687588)}#pfRoot .pf-rail-item[aria-pressed=true]{background:var(--bg,#f5f7fa);box-shadow:inset 2px 0 #e8832b}#pfRoot .pf-rail-bottom{margin-top:auto;padding-top:36px;display:flex;flex-direction:column;align-items:flex-start;gap:10px}#pfRoot .pf-text-action{text-decoration:none}#pfRoot .pf-text-action:hover{text-decoration:underline}#pfRoot .pf-stage{min-width:0;padding:20px 0 0 26px}#pfRoot .pf-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}#pfRoot .pf-editor-heading h2{margin:0}#pfRoot .pf-candidates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}#pfRoot .pf-candidates .pf-box{margin:0!important;border-radius:6px;padding:16px}#pfRoot .pf-candidates .pf-row strong{font-weight:500}#pfRoot .pf-candidates .pf-row>span{font-size:11px;color:var(--muted)}#pfRoot .pf-candidates .pf-product{grid-template-columns:100px minmax(0,1fr);border:0}#pfRoot .pf-candidates .pf-box>button{border:0;background:transparent;padding-left:0;margin-right:10px;color:var(--muted)}#pfRoot .pf-candidates .pf-box>button[data-action=candidate]{color:var(--ink);font-weight:600}#pfRoot summary{cursor:pointer;color:var(--muted,#687588)}#pfRoot .pf-evidence{margin:8px 0 12px;font-size:12px}#pfRoot .pf-error:empty{display:none}#pfRoot .pf-compose{display:grid;grid-template-columns:220px minmax(0,1fr);gap:18px}#pfRoot .pf-picker h3{font-size:13px;font-weight:500;margin:0 0 8px}#pfRoot .pf-picker section{margin-bottom:22px}#pfRoot .pf-picker .pf-product{grid-template-columns:1fr auto;gap:3px}#pfRoot .pf-picker .pf-product code{grid-column:1}#pfRoot .pf-picker .pf-product span{grid-column:1;font-size:12px}#pfRoot .pf-picker .pf-product button{grid-column:2;grid-row:1/3;border:0;padding:5px;font-size:12px}#pfRoot .pf-form-row{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:20px}#pfRoot .pf-form-row label{display:flex;flex-direction:column;gap:6px;flex:1;min-width:160px}#pfRoot .pf-confirm-relation{display:block;margin:20px 0}#pfRoot .pf-context-links{display:flex;justify-content:space-between;gap:12px;font-size:12px}#pfRoot .pf-steps{margin:0 0 20px;gap:22px}#pfRoot .pf-template-tools{margin:18px 0}#pfRoot .pf-chips{display:none}#pfRoot .pf-numeric input{width:15px;height:15px;border-radius:50%}#pfRoot .pf-error{font-size:12px}#pfRoot .pf-detection{font-size:12px}
@media(max-width:1100px){#pfRoot .pf-compose{grid-template-columns:1fr}#pfRoot .pf-picker{display:grid;grid-template-columns:1fr 1fr;gap:16px}#pfRoot .pf-picker .pf-list{max-height:180px}#pfRoot .pf-candidates{grid-template-columns:1fr}}
@media(max-width:680px){#pfRoot{padding:16px;min-height:0}#pfRoot .pf-heading{align-items:flex-start;flex-direction:column}#pfRoot .pf-workspace{grid-template-columns:1fr}#pfRoot .pf-rail{border-right:0;border-bottom:1px solid var(--pf-line);padding:14px 0;flex-direction:row;flex-wrap:wrap}#pfRoot .pf-rail-title{width:100%;margin:0}#pfRoot .pf-rail-bottom{margin:0;padding-top:8px;flex-direction:row;flex-wrap:wrap;gap:12px}#pfRoot .pf-stage{padding:18px 0 0}#pfRoot .pf-editor-heading{flex-wrap:wrap}#pfRoot .pf-picker{grid-template-columns:1fr 1fr}#pfRoot .pf-heading .pf-row{gap:8px}#pfRoot .pf-candidates{grid-template-columns:1fr}}

#pfRoot .pf-secondary{color:var(--ink,#1a2230)!important;background:var(--pf-card)!important}#pfRoot .pf-numeric input{appearance:none;border:1px solid var(--muted,#8a94a6);padding:0;border-radius:50%;width:15px;height:15px;display:inline-grid;place-content:center}#pfRoot .pf-numeric input:checked::after{content:"";width:7px;height:7px;border-radius:50%;background:var(--ink,#16335b)}

/* Reference HTML v3: horizontal three-step layout, fixed 2 by 2 grouping. */
#pfRoot .pf-reference-steps{display:flex;gap:0;padding:16px 0;border-bottom:1px solid var(--border,#e5e8ec)}
#pfRoot .pf-reference-steps button{display:flex;align-items:center;gap:8px;border:1px solid var(--pf-line);border-radius:0;padding:10px 22px;background:var(--surface-2,var(--bg));color:var(--muted);margin:0}
#pfRoot .pf-reference-steps button:first-child{border-radius:8px 0 0 8px}
#pfRoot .pf-reference-steps button:last-child{border-radius:0 8px 8px 0}
#pfRoot .pf-reference-steps button[aria-current=true]{background:var(--action-bg);color:var(--action-ink);border-color:var(--action-bg)}
#pfRoot .pf-step-number{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:var(--pf-card);color:var(--ink);border:1px solid var(--pf-line);font-size:11px}
#pfRoot .pf-reference-content{padding-top:18px}
#pfRoot .pf-reference-content .pf-grid{display:grid;grid-template-columns:minmax(240px,1fr) minmax(0,1.5fr);gap:16px}
#pfRoot .pf-reference-content .pf-chips{display:flex}
#pfRoot .pf-reference-content .pf-candidates{display:block}
#pfRoot .pf-reference-content .pf-list{max-height:280px;overflow:auto}
@media(max-width:760px){#pfRoot .pf-reference-content .pf-grid{grid-template-columns:1fr}#pfRoot .pf-reference-steps button{padding:10px;flex:1;font-size:12px}}

/* Three candidate lanes: compact, distinct, no decorative color blocks. */
#pfRoot .pf-candidate-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0 24px}
#pfRoot .pf-candidate-column{border:1px solid var(--border,#e5e8ec);border-radius:8px;min-width:0;overflow:hidden;--lane:#16335b}
#pfRoot .pf-kind-npi{--lane:#b75c16}#pfRoot .pf-kind-planned{--lane:#537d77}
#pfRoot .pf-candidate-column>header{position:static!important;display:flex;justify-content:space-between;align-items:center;padding:13px 16px;background:transparent;box-shadow:none;border:0;border-top:3px solid var(--lane);border-bottom:1px solid var(--border,#e5e8ec);height:auto;min-height:0}
#pfRoot .pf-candidate-column h2{font-size:16px;margin:0;color:var(--lane)}
#pfRoot .pf-candidate-column header>span{font-size:12px;color:var(--lane)}
#pfRoot .pf-candidate-card{padding:13px 16px;border-bottom:1px solid var(--border,#e5e8ec);min-width:0}
#pfRoot .pf-candidate-card:last-child{border-bottom:0}
#pfRoot .pf-candidate-meta{font-size:11px;color:var(--muted,#8a94a6);margin-bottom:8px}
#pfRoot .pf-candidate-products>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px;align-items:baseline;line-height:1.6}
#pfRoot .pf-candidate-products code{font-size:11px;overflow-wrap:anywhere}#pfRoot .pf-candidate-products span{font-size:13px;overflow-wrap:anywhere}
#pfRoot .pf-direction{display:block;color:var(--muted,#8a94a6);margin-left:3px;font-size:12px}
#pfRoot .pf-candidate-actions{display:flex;gap:8px;margin-top:10px}
#pfRoot .pf-candidate-actions button{padding:5px 12px;font-size:12px;box-shadow:none}
#pfRoot .pf-candidate-confirm{color:var(--lane,#16335b);border-color:var(--lane,#16335b);background:transparent}
#pfRoot .pf-evidence{margin-top:8px;font-size:11px}#pfRoot .pf-candidate-empty{padding:16px}
#pfRoot .pf-review-history{margin-top:20px;border-top:1px solid var(--border,#e5e8ec);padding-top:16px}
#pfRoot .pf-review-history h2{font-size:14px;margin:0 0 10px}#pfRoot .pf-review-history small{font-weight:normal;color:var(--muted,#8a94a6)}
#pfRoot .pf-review-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#pfRoot .pf-review-grid .pf-candidate-card{border:1px solid var(--border,#e5e8ec);border-radius:6px;margin-top:10px}
@media(max-width:760px){#pfRoot .pf-candidate-columns,#pfRoot .pf-review-grid{grid-template-columns:1fr}}

#pfRoot .pf-candidate-card>.pf-evidence{margin:8px 0 10px;font-size:12px;line-height:1.65;color:var(--muted,#687588);overflow-wrap:anywhere}

#pfRoot .pf-reference-steps{padding:8px 0 12px;margin-bottom:0}
#pfRoot .pf-reference-content{padding-top:10px}
#pfRoot .pf-detection-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0;font-size:12px}
#pfRoot .pf-detection-toolbar input{width:64px;min-width:0;padding:5px 8px}
#pfRoot .pf-detection-toolbar button{padding:5px 12px;font-size:12px}
#pfRoot .pf-detection-logic{font-size:12px;line-height:1.65;color:var(--muted,#687588);margin:8px 0 0;max-width:none}
#pfRoot .pf-candidate-columns{margin-top:12px}

#pfRoot .pf-step-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:1px solid var(--pf-border,#e5e8ec);padding-bottom:10px}
#pfRoot .pf-step-toolbar .pf-reference-steps{border-bottom:0;padding:0;margin:0}
#pfRoot .pf-error:empty{display:none}

/* Shared action tokens follow all system themes, including dark and contrast. */
#pfSwitch button[aria-pressed=true]{background:var(--action-bg);color:var(--action-ink)}
#pfRoot button:hover:not(:disabled){background:var(--surface-2,var(--bg));color:var(--ink);border-color:var(--action-focus)}
#pfRoot .pf-primary:hover:not(:disabled),#pfRoot .pf-reference-steps button[aria-current=true]:hover:not(:disabled),#pfSwitch button[aria-pressed=true]:hover{background:var(--action-hover);color:var(--action-ink);border-color:var(--action-hover)}
#pfRoot .pf-secondary:hover:not(:disabled){background:var(--surface-2,var(--bg))!important}
#pfRoot .pf-candidate-confirm{color:var(--action-bg);border-color:var(--action-border)}
#pfRoot .pf-reference-steps button[aria-current=true] .pf-step-number{background:var(--action-ink);color:var(--action-bg);border-color:transparent}
#pfRoot button:disabled{opacity:1;background:var(--action-disabled-bg);color:var(--action-disabled-ink);border-color:var(--action-disabled-border)}
#pfSwitch button:focus-visible{outline:2px solid var(--action-focus);outline-offset:3px}
[data-theme=dark] #pfRoot .pf-candidate-column{--lane:#9ac9ff}
[data-theme=dark] #pfRoot .pf-kind-npi{--lane:#f0b47c}
[data-theme=dark] #pfRoot .pf-kind-planned{--lane:#8bc8bb}
[data-theme=contrast] #pfRoot .pf-candidate-column{--lane:var(--ink)}

#pfRoot .pf-icon{font-size:20px;line-height:1;width:30px;height:30px;padding:0;background:transparent;border:0;flex-shrink:0}#pfRoot .pf-remove:hover{color:var(--action-danger)!important}#pfRoot .pf-member-cards{display:grid;gap:10px;margin-top:16px;max-height:330px;overflow:auto}#pfRoot .pf-member-card{border:1px solid var(--pf-line);border-radius:7px;padding:12px}#pfRoot .pf-member-card strong{margin:0 10px;font-weight:500}#pfRoot .pf-member-card small{color:var(--muted)}#pfRoot .pf-member-dates{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px;font-size:12px}#pfRoot .pf-member-dates input[type=month]{width:135px}#pfRoot .pf-drop-hint{border:1px dashed var(--pf-line);border-radius:6px;padding:12px;margin-top:12px;text-align:center;color:var(--muted);font-size:12px}#pfRoot #pfDrop.pf-drag-over{outline:2px dashed var(--action-focus);background:var(--surface-2)}#pfRoot .pf-product,#pfRoot .pf-family[draggable]{cursor:grab}#pfRoot .pf-product{border:1px solid var(--pf-line);border-radius:6px;padding:10px;margin-bottom:8px}#pfRoot .pf-family small{color:var(--muted)}

/* Compact segmented controls; preserve focus and selected-state contrast. */
#pfSwitch{padding:2px;gap:2px;margin-bottom:14px;border-radius:7px}
#pfSwitch button{padding:6px 14px;font-size:13px;line-height:20px;border-radius:4px;min-height:32px}
#pfRoot .pf-reference-steps button{padding:6px 16px;gap:6px;font-size:13px;line-height:20px;min-height:34px}
#pfRoot .pf-step-number{width:17px;height:17px;font-size:10px}
#pfRoot .pf-step-toolbar{padding-bottom:8px;gap:8px}
@media(max-width:760px){#pfSwitch button{padding:6px 10px}#pfRoot .pf-reference-steps button{padding:6px 10px;font-size:12px}}

#pfRoot .pf-template-tools{gap:7px;margin:12px 0;font-size:12px}#pfRoot .pf-template-tools button{padding:5px 9px;font-size:12px}#pfRoot .pf-pxm{display:flex;align-items:center;gap:5px;margin-left:8px}#pfRoot .pf-pxm input{width:52px;padding:5px}#pfRoot #pfTarget{max-width:210px;font-size:12px;padding:5px}

#pfRoot #pfChart{position:relative}#pfRoot .pf-share-label{font-size:11px;fill:var(--ink);paint-order:stroke;stroke:var(--card);stroke-width:3px;cursor:text}#pfRoot .pf-boundary{stroke:transparent;stroke-width:9px;cursor:ns-resize}#pfRoot .pf-boundary:hover{stroke:var(--action-focus);stroke-width:3px}#pfRoot .pf-inline-edit{position:absolute;left:50%;top:35%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:10px;background:var(--card);border:1px solid var(--action-focus);border-radius:8px;z-index:3}#pfRoot .pf-range-toolbar{display:flex;align-items:center;gap:8px;font-size:12px}#pfRoot .pf-range-toolbar span{color:var(--muted)}#pfRoot .pf-range-toolbar button{font-size:12px;padding:5px 9px}#pfRoot .pf-range-panel{padding:12px 0}#pfRoot .pf-period-strip{display:flex;overflow:auto;gap:3px;margin-bottom:10px;touch-action:none}#pfRoot .pf-period-strip button{font-size:11px;white-space:nowrap;padding:5px 8px}#pfRoot .pf-period-strip [aria-pressed=true]{background:var(--action-bg);color:var(--action-ink)}#pfRoot .pf-range-panel select{max-width:230px;font-size:12px}#pfRoot .pf-drag-readout{min-height:20px;color:var(--ink);font-size:12px}#pfRoot .pf-share-label:focus-visible{outline:2px solid var(--action-focus)}

#pfCleaningTargets{padding:8px 0 12px}#pfCleaningTargets p{margin:4px 0 8px}#pfCleaningTargets select{min-height:32px;max-width:100%;background:var(--surface,#fff);color:var(--text,#1a2230);border:1px solid var(--border,#e5e8ec);border-radius:6px}

/* Step 2: compact rows and cards, independent of primary and other page typography. */
html #pfRoot[data-step="2"] .pf-box{padding:9px;gap:5px}
html #pfRoot[data-step="2"] .pf-box h2{font-size:var(--nav-secondary-size)!important;line-height:1.3;margin:0 0 6px}
html #pfRoot[data-step="2"] .pf-editor-heading{margin-bottom:6px}
html #pfRoot[data-step="2"] .pf-product{grid-template-columns:minmax(64px,.7fr) minmax(0,1.5fr) auto;align-items:center;padding:2px 5px;margin-bottom:4px;gap:5px;min-height:0}
html #pfRoot[data-step="2"] :is(.pf-product,.pf-family){line-height:1.2}
html #pfRoot[data-step="2"] :is(.pf-product,.pf-family,.pf-member-card) :is(button,input,select){min-height:max(22px,calc(1.2em + 4px))!important;height:auto!important;padding:1px 4px!important;line-height:1.2!important}
html #pfRoot[data-step="2"] .pf-member-cards{gap:5px;margin-top:8px}
html #pfRoot[data-step="2"] .pf-member-card{padding:5px 6px}
html #pfRoot[data-step="2"] .pf-member-card .pf-row{gap:5px}
html #pfRoot[data-step="2"] .pf-member-card strong{margin:0 5px}
html #pfRoot[data-step="2"] .pf-member-dates{gap:5px;margin-top:4px;align-items:center}
html #pfRoot[data-step="2"] .pf-member-dates label{font-size:var(--nav-secondary-size)!important;line-height:1.2!important}
html #pfRoot[data-step="2"] .pf-family{padding:4px 0;margin:0}
html #pfRoot[data-step="2"] .pf-drop-hint{padding:6px;margin-top:6px}
html #pfRoot[data-step="2"] .pf-icon{width:24px;height:24px;padding:0}
@media(pointer:coarse){html #pfRoot[data-step="2"] :is(.pf-product,.pf-family,.pf-member-card) :is(button,input,select){min-height:44px!important}}
html #pfRoot[data-step="2"] .pf-member-card{padding:4px 6px}
html #pfRoot[data-step="2"] .pf-member-card>.pf-row{line-height:1.2;min-height:18px}
html #pfRoot[data-step="2"] .pf-member-card .pf-icon{width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;line-height:1!important}
html #pfRoot[data-step="2"] .pf-member-dates{margin-top:2px}
html #pfRoot[data-step="2"] .pf-member-dates :is(input,select){font-size:var(--nav-secondary-size)!important}
html #pfRoot[data-step="2"] .pf-member-dates input[type=checkbox]{width:14px;height:14px!important;min-height:14px!important;padding:0!important}
html #pfRoot[data-step="2"] .pf-family>small{display:none}
@media(pointer:coarse){html #pfRoot[data-step="2"] .pf-member-card .pf-icon{width:44px!important;height:44px!important;min-height:44px!important}}

#pfRoot .pf-group-notice{font-size:var(--nav-secondary-size);color:var(--muted);line-height:1.3;margin-left:auto}

#pfRoot .pf-steps{flex-wrap:nowrap;overflow-x:auto;min-width:0;max-width:100%}#pfRoot .pf-steps button{white-space:nowrap;flex-shrink:0}#pfRoot .pf-step-toolbar{min-width:0}

#pfAssociationChoices{max-height:300px;overflow:auto;border-block:1px solid var(--line);margin:8px 0}.pf-association-option{display:flex;align-items:center;gap:8px;padding:5px 4px;border-bottom:1px solid var(--line);cursor:pointer}.pf-association-option input{flex-shrink:0}.pf-association-option code{min-width:85px}.pf-association-option span{overflow-wrap:anywhere}#pfAssociationSearch{width:100%}

/* Unified product workspace: compact information rows, distinct business actions. */
html #pfRoot{font-family:var(--font-family);font-size:var(--display-text,14px);border-radius:7px}
html #pfRoot .pf-candidate-columns{align-items:start;gap:var(--display-gap,12px);margin-top:8px}
html #pfRoot .pf-candidate-body{max-height:480px;overflow:auto;overscroll-behavior:contain}
html #pfRoot .pf-candidate-column{min-height:0}
html #pfRoot .pf-candidate-column header{position:static;min-height:0;height:auto;padding:7px 10px;background:var(--surface-2,var(--bg));color:var(--ink);border-bottom:1px solid var(--line)}
html #pfRoot .pf-candidate-column h2{font-size:var(--nav-secondary-size)!important;margin:0;font-weight:600}
html #pfRoot .pf-candidate-card{padding:10px;border-bottom:1px solid var(--line)}
html #pfRoot .pf-candidate-products>div{display:grid;grid-template-columns:auto minmax(70px,.7fr) minmax(0,1.4fr);align-items:baseline;gap:5px}
html #pfRoot .pf-candidate-products>div:not(:has(small)){grid-template-columns:minmax(70px,.7fr) minmax(0,1.4fr)}
html #pfRoot .pf-candidate-meta,html #pfRoot .pf-evidence{font-size:var(--type-detail,12px)!important;line-height:1.4!important;color:var(--gray);margin:4px 0}
html #pfRoot .pf-candidate-actions{flex-wrap:wrap;gap:6px;margin-top:6px}
html #pfRoot .pf-candidate-actions .pf-muted{width:100%;font-size:var(--type-detail)!important}
html #pfRoot .pf-review-history{margin-top:12px;padding-top:8px}
html #pfRoot .pf-review-grid{gap:8px;max-height:360px;overflow:auto}
html #pfRoot .pf-empty{padding:20px 12px}
html #pfRoot .pf-reference-steps button{border:0;background:transparent!important;border-radius:0!important;border-bottom:2px solid transparent;padding-inline:12px}
html #pfRoot .pf-reference-steps button[aria-current=true]{background:var(--secondary-bg)!important}
html #pfRoot .pf-direction{margin:2px 0 2px 40px}
html #pfRoot .pf-step-number{display:none}

html #pfRoot .pf-purpose{margin:0 0 8px;font-size:var(--type-detail)!important;color:var(--gray)}html #pfRoot .pf-purpose:empty{display:none}

html #pfRoot .pf-candidate-body{max-height:360px}html #pfRoot .pf-candidate-products{margin:0}html #pfRoot .pf-candidate-card{padding:8px 10px}html #pfRoot .pf-candidate-meta{margin:0 0 3px}

/* Product identity must remain readable with independent user text sizing. */
html #pfRoot{font-family:var(--font-family,inherit);font-size:var(--display-text,14px)}
html #pfRoot code,html #pfRoot .pf-candidate-products code,html #pfRoot .pf-picker .pf-product code{font-size:var(--type-detail,12px)}
html #pfRoot .pf-candidate-products span{font-size:var(--display-text,14px)}
html #pfRoot .pf-picker .pf-product span{font-size:var(--type-detail,12px)}

/* M2 association review: aligned cards, explicit steps, compact records. */
html #pfRoot .pf-step-number{display:inline-flex;align-items:center;justify-content:center;margin-right:5px;font-variant-numeric:tabular-nums;opacity:.8}
html #pfRoot .pf-candidate-columns{gap:10px;align-items:stretch}
html #pfRoot .pf-column-purpose{margin:0;padding:5px 10px 7px;font-size:var(--type-detail,12px);color:var(--muted,#657080);border-bottom:1px solid var(--line,#e3e7ed);min-height:2.5em}
html #pfRoot .pf-candidate-body{max-height:440px;scrollbar-gutter:stable}
html #pfRoot .pf-candidate-card{display:flex;flex-direction:column;box-sizing:border-box;padding:9px 10px;gap:5px}
html #pfRoot .pf-candidate-products{display:flex;flex-direction:column;gap:3px}
html #pfRoot .pf-candidate-products>div{grid-template-columns:auto minmax(0,1fr);align-items:start;gap:3px 7px}
html #pfRoot .pf-candidate-products>div>span{grid-column:1/-1;min-height:2.6em;line-height:1.3;overflow-wrap:anywhere}
html #pfRoot .pf-direction{display:none}
html #pfRoot .pf-evidence{margin:0;line-height:1.45;overflow-wrap:anywhere}
html #pfRoot .pf-candidate-actions{margin-top:auto;padding-top:4px;gap:6px;align-items:center}
html #pfRoot .pf-candidate-actions button,html #pfRoot .pf-review-tools button,html #pfRoot .pf-review-more{min-height:28px;height:auto;padding:3px 8px;font-size:var(--type-detail,12px)!important;line-height:1.35;border-radius:4px}
html #pfRoot .pf-review-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
html #pfRoot .pf-review-tabs{display:flex;gap:4px;flex-wrap:wrap}
html #pfRoot .pf-review-tabs button[aria-pressed=true]{color:var(--nav-secondary-active-color,#a64b17);background:var(--nav-secondary-active-bg,#fff0df);border-color:currentColor}
html #pfRoot #pfReviewSearch{width:240px;max-width:100%;min-height:30px;font-size:var(--type-detail,12px)}
html #pfRoot .pf-review-grid{display:grid;grid-template-columns:1fr;max-height:none;overflow:visible;gap:0}
html #pfRoot .pf-review-grid .pf-candidate-card{display:grid;grid-template-columns:minmax(180px,1fr) minmax(160px,1.2fr) auto;align-items:center;gap:5px 12px;margin:0;border:0;border-bottom:1px solid var(--line,#e3e7ed);border-radius:0}
html #pfRoot .pf-review-grid .pf-candidate-meta{grid-column:1/-1}
html #pfRoot .pf-review-grid .pf-candidate-products>div>span{min-height:0}
html #pfRoot .pf-review-grid .pf-candidate-actions{margin:0;padding:0}
html #pfRoot .pf-review-more{margin-top:8px}
@media(max-width:900px){html #pfRoot .pf-candidate-columns{grid-template-columns:1fr}html #pfRoot .pf-review-grid .pf-candidate-card{display:flex;align-items:stretch}html #pfRoot .pf-candidate-body{max-height:400px}}
@media(pointer:coarse){html #pfRoot .pf-candidate-actions button,html #pfRoot .pf-review-tools button,html #pfRoot .pf-review-more{min-height:44px}}
html #pfRoot .pf-candidate-products>div{grid-template-columns:auto auto minmax(0,1fr)}
html #pfRoot .pf-candidate-products>div:not(:has(small)){grid-template-columns:auto minmax(0,1fr)}
html #pfRoot .pf-candidate-products>div>span{grid-column:auto;min-height:2.6em}
html #pfRoot .pf-column-purpose{min-height:0}
html #pfRoot .pf-review-tabs button[aria-pressed=true]{color:var(--secondary-ink,var(--ink));background:var(--secondary-bg);border-color:var(--secondary-ink,var(--line))}
@media(max-width:900px){html #pfRoot .pf-reference-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:4px}html #pfRoot .pf-reference-steps button{white-space:nowrap;justify-content:flex-start;padding:6px 4px;min-width:0}html #pfRoot .pf-step-toolbar{flex-wrap:wrap}}

/* Unified four-step workbench density; typography follows personal settings. */
html #pfRoot button,html #pfRoot input,html #pfRoot select{font-size:var(--type-detail,12px)!important;min-height:28px;padding:3px 8px;border-radius:4px}
html #pfRoot .pf-step-toolbar{padding:0 0 5px;margin-bottom:6px;gap:8px}
html #pfRoot .pf-reference-steps{gap:4px!important;margin:0}
html #pfRoot .pf-grid{gap:10px!important;margin-top:8px!important}
html #pfRoot .pf-box{padding:9px;border-radius:5px}
html #pfRoot .pf-list{max-height:230px}
html #pfRoot .pf-box h2{font-size:var(--type-detail,12px)!important;font-weight:600;margin-bottom:6px}
html #pfRoot .pf-member-card{padding:6px 8px;margin:4px 0;border-radius:4px}
html #pfRoot .pf-member-card strong{font-size:var(--type-detail,12px);font-weight:500}
html #pfRoot .pf-template-tools{gap:5px;margin:7px 0}
html #pfRoot .pf-template-tools button{background:var(--card);color:var(--ink);border-color:var(--line)}
html #pfRoot .pf-candidate-body{max-height:355px}
html #pfRoot .pf-candidate-column>header{padding:6px 9px}
@media(pointer:coarse){html #pfRoot button,html #pfRoot select{min-height:40px}}

html #pfRoot .pf-candidate-products>div>span{min-height:1.35em}
html #pfRoot .pf-candidate-card{gap:4px}
html #pfRoot .pf-candidate-column>header{padding:6px 9px}

/* Compact relationship evidence and server-recorded history */
#pfDialog.rr-dialog{width:min(1120px,94vw);max-width:94vw;max-height:88vh;padding:14px;font-size:12px;overflow:auto}
.rr-evidence-controls,.rr-history-tools,.rr-history-pager,.rr-chart-caption{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.rr-evidence-controls label,.rr-history-tools label{display:flex;align-items:center;gap:4px}
.rr-evidence-controls input,.rr-evidence-controls select,.rr-history-tools input,.rr-history-tools select{font-size:12px;padding:4px 6px;min-height:28px;max-width:200px}
.rr-evidence-layout{display:grid;grid-template-columns:minmax(0,2.5fr) minmax(220px,1fr);gap:16px;margin-top:12px}
.rr-evidence-layout svg{display:block;width:100%;height:auto}.rr-evidence-layout svg text{font:11px sans-serif;fill:currentColor}
.rr-chart-caption{justify-content:space-between}.rr-chart-caption i{display:inline-block;width:8px;height:8px;margin-left:8px}
.rr-facts ul{padding-left:17px;margin:8px 0}.rr-facts li{margin-bottom:10px}.rr-facts li>span{font-size:11px;opacity:.65;margin-left:6px}.rr-facts p{margin:3px 0!important;font-size:12px!important;line-height:1.5}.rr-facts small{opacity:.6}
.rr-history-table{overflow:auto;margin-top:8px}.rr-history-table table,.rr-evidence-table table{border-collapse:collapse;width:100%;font-size:12px;font-variant-numeric:tabular-nums}
.rr-history-table th,.rr-history-table td,.rr-evidence-table td,.rr-evidence-table th{padding:6px 8px!important;border-bottom:1px solid var(--border,#d8dce1);text-align:left;white-space:nowrap;font-size:12px!important}.rr-history-table small{opacity:.65;font-size:11px}
.rr-history-pager{justify-content:flex-end;margin-top:8px}.rr-history-pager span{margin-right:auto}.rr-evidence-action{text-align:right;margin-top:10px}.rr-evidence-table{margin-top:12px}.rr-evidence-table summary{cursor:pointer}
@media(max-width:760px){.rr-evidence-layout{grid-template-columns:1fr}.rr-facts ul{columns:2}.rr-facts li{break-inside:avoid}}

html #pfRoot #pfDialog.rr-dialog .rr-evidence-layout>.cf-toolbar{display:none!important}
html #pfRoot #pfDialog.rr-dialog .rr-evidence-layout{grid-template-columns:minmax(0,2.5fr) minmax(220px,1fr)}
html #pfRoot #pfDialog.rr-dialog p,html #pfRoot #pfDialog.rr-dialog li,html #pfRoot #pfDialog.rr-dialog label,html #pfRoot #pfDialog.rr-dialog input,html #pfRoot #pfDialog.rr-dialog select,html #pfRoot #pfDialog.rr-dialog button{font-size:12px!important;line-height:1.45}
html #pfRoot #pfDialog.rr-dialog .rr-facts p{margin:3px 0!important}
@media(max-width:760px){html #pfRoot #pfDialog.rr-dialog .rr-evidence-layout{grid-template-columns:1fr}}

html #pfRoot #pfDialog.rr-dialog .rr-facts{max-height:min(58vh,500px);overflow:auto;padding-right:4px}

/* Equal-height candidate records and aligned list viewport across all lanes. */
html #pfRoot .pf-candidate-columns .pf-candidate-body{height:355px;min-height:355px;overflow:auto}
html #pfRoot .pf-candidate-columns .pf-candidate-card{flex-shrink:0}

html body #pfRoot .pf-candidate-columns .pf-candidate-body{height:355px!important;min-height:355px!important;max-height:355px!important;padding:0!important}
html body #pfRoot .pf-candidate-actions .pf-muted:empty{display:none}
html body #pfRoot .pf-candidate-actions .pf-muted{order:-1}
html body #pfRoot .pf-candidate-columns .pf-candidate-card{margin:0!important}

html body #pfRoot .pf-candidate-column{display:flex;flex-direction:column}
html body #pfRoot .pf-candidate-column>.pf-candidate-body{flex:none}

/* Compact equal-height records: one-line summaries; full evidence in review. */
html body #pfRoot .pf-candidate-columns .pf-candidate-card{padding:5px 8px!important;gap:2px!important}
html body #pfRoot .pf-candidate-card .pf-evidence{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.35!important}
html body #pfRoot .pf-candidate-card .pf-candidate-products>div>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:0!important;line-height:1.35}
html body #pfRoot .pf-candidate-card .pf-reference-recommendation{flex-wrap:nowrap;min-width:0}
html body #pfRoot .pf-candidate-card .pf-reference-recommendation small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
html body #pfRoot .pf-candidate-card .advisor-entry{flex-shrink:0;min-height:24px!important;height:24px!important;padding:1px 3px!important}
html body #pfRoot .pf-candidate-card .advisor-entry img{width:18px;height:18px}
html body #pfRoot .pf-candidate-card .pf-candidate-actions{padding-top:2px;gap:5px}
html body #pfRoot .pf-candidate-card .pf-candidate-actions button{min-height:24px;height:24px;padding:1px 7px}
@media(pointer:coarse){html body #pfRoot .pf-candidate-card .pf-candidate-actions button{min-height:40px;height:40px}}

html body #pfRoot .pf-candidate-column>header{gap:7px;min-height:31px;box-sizing:border-box;padding:4px 8px}
html body #pfRoot .pf-candidate-column>header h2{margin-right:auto}
html body #pfRoot .pf-header-recommend{font-size:11px!important;min-height:22px!important;height:22px;padding:1px 5px!important}

html body #pfRoot .pf-restored-advisor{padding:3px 8px;gap:5px;flex-wrap:nowrap;border-bottom:1px solid var(--line);min-width:0}
html body #pfRoot .pf-restored-advisor small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
html body #pfRoot .pf-restored-advisor .advisor-entry{flex-shrink:0}

/* Keep the single review action beside the chart month axis, not after details. */
html #pfRoot #pfDialog.rr-dialog .rr-review-side{display:flex;flex-direction:column;min-height:0;contain:size}
html #pfRoot #pfDialog.rr-dialog .rr-review-side>.rr-facts{flex:1;min-height:0;max-height:none;overflow:auto}
html #pfRoot #pfDialog.rr-dialog .rr-review-side>.rr-evidence-action{flex:none;margin:6px 0 0;padding-bottom:3px;text-align:right}
@media(max-width:760px){
 html #pfRoot #pfDialog.rr-dialog .rr-review-side{display:contents;contain:none}
 html #pfRoot #pfDialog.rr-dialog .rr-review-side>.rr-evidence-action{grid-row:2;margin:0;padding:0}
 html #pfRoot #pfDialog.rr-dialog .rr-review-side>.rr-facts{grid-row:3;max-height:40vh}
}

/* Unified unit directory follows the existing theme and density. */
#pfRoot .pu-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line,#dce4e8);border-radius:8px;margin-bottom:12px;background:var(--panel,#fff)}
#pfRoot .pu-table{width:100%;border-collapse:collapse}#pfRoot .pu-table th,#pfRoot .pu-table td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line,#dce4e8)}
#pfRoot .pu-table td:last-child{white-space:nowrap}#pfRoot .pu-table td:last-child>*{margin-right:12px}#pfRoot .pu-table details{font-size:.9em;margin-top:5px}#pfRoot .pu-paging{justify-content:flex-end;margin:12px 0}
#pfRoot .pu-table code{color:var(--muted,#677783)}#pfRoot .pu-table strong{font-weight:550}

#pfRoot .pf-create-grid{display:grid;grid-template-columns:minmax(220px,1fr) minmax(320px,2fr);gap:16px}#pfRoot .pf-built-units{margin-top:20px}#pfRoot .pf-create-grid .pf-list{max-height:410px;overflow:auto}@media(max-width:800px){#pfRoot .pf-create-grid{grid-template-columns:1fr}}

#pfRoot .pf-allocation-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin-top:12px}
#pfRoot .pf-allocation-layout.with-reference{grid-template-columns:minmax(0,1fr) 310px}
#pfRoot .pf-allocation-main{min-width:0}#pfRoot .pf-allocation-toolbar,#pfRoot .pf-reference-presets{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:10px 0}
#pfRoot .pf-allocation-toolbar input[type=number]{width:66px}#pfRoot .pf-reference-side{border-left:1px solid var(--pf-line);padding-left:16px;background:var(--pf-card)}
#pfRoot .pf-reference-side label{display:block}#pfRoot .pf-reference-window{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--pf-line);padding:12px 0}
#pfRoot .pf-reference-window input[type=number]{width:64px}#pfRoot .pf-reference-result{margin-top:20px}#pfRoot .pf-reference-result b{float:right}
#pfRoot .pf-relationship{margin-top:10px;padding:10px 0;border-bottom:1px solid var(--pf-line)}#pfRoot .pf-relationship textarea{width:min(100%,650px);min-height:50px;display:block}
#pfRoot .pf-matrix{margin:16px 0}#pfRoot .pf-matrix td input[type=number]{width:75px}#pfRoot .pf-matrix td small{display:block;white-space:nowrap}#pfRoot .pf-matrix td label{display:block;font-size:11px}
@media(max-width:1000px){#pfRoot .pf-allocation-layout.with-reference{grid-template-columns:minmax(0,1fr)}#pfRoot .pf-reference-side{border-left:0;border-top:1px solid var(--pf-line);padding:12px 0}}
/* Replacement relationship editor: compact type and full-width evidence. */
html #pfRoot #pfDialog:has(#pfOld){font-size:12px;line-height:1.45}
html #pfRoot #pfDialog:has(#pfOld) :is(label,p,select,input,textarea,button){font-size:12px!important;line-height:1.45}
html #pfRoot #pfDialog:has(#pfOld) .pf-row>label{flex:1;min-width:0}
html #pfRoot #pfDialog:has(#pfOld) select{display:block;width:100%;min-width:0}
html #pfRoot #pfDialog:has(#pfOld) label:has(#pfRelationshipEvidence){display:block;width:100%;margin-top:12px}
html #pfRoot #pfDialog:has(#pfOld) #pfRelationshipEvidence{display:block;box-sizing:border-box;width:100%;max-width:100%;min-height:96px;margin-top:6px;resize:vertical;font-family:inherit}
#pfRoot .pf-setup-list{margin:16px 0;padding:12px;border:1px solid var(--pf-line)}
#pfRoot .pf-setup-list .pf-family{cursor:grab;padding:10px}
#pfRoot .pf-setup-list .pf-family:hover{background:var(--surface-2,var(--bg))}
#pfRoot .pf-setup-list h2{font-size:14px;margin-bottom:6px}
/* Compact work list: one aligned row per unit, restrained hierarchy. */
html #pfRoot .pf-setup-list{margin:8px 0;padding:0 0 4px;border:0;border-bottom:1px solid var(--pf-line);border-radius:0;box-shadow:none}
html #pfRoot .pf-setup-list h2{font-size:12px!important;line-height:1.4!important;font-weight:600;margin:0 0 4px!important;padding:0!important}
html #pfRoot .pf-setup-list .pf-family{display:grid;grid-template-columns:minmax(140px,210px) minmax(0,1fr);align-items:baseline;gap:12px;padding:4px 6px!important;margin:0!important;min-height:26px;border-bottom:1px solid var(--pf-line);border-radius:0}
html #pfRoot .pf-setup-list .pf-family :is(strong,p){font-size:12px!important;line-height:1.4!important;margin:0!important;padding:0!important;min-width:0;overflow-wrap:anywhere}
html #pfRoot .pf-setup-list .pf-family strong{font-weight:500;color:var(--ink)}
html #pfRoot .pf-setup-list .pf-family p{color:var(--muted)}
html #pfRoot .pf-setup-list>button{font-size:12px!important;line-height:1.4!important;padding:3px 6px!important;margin:3px 0 0;border:0;background:transparent}
@media(max-width:700px){html #pfRoot .pf-setup-list .pf-family{grid-template-columns:minmax(100px,30%) minmax(0,1fr);gap:8px}}
@media(pointer:coarse){html #pfRoot .pf-setup-list .pf-family{min-height:44px;align-items:center}html #pfRoot .pf-setup-list>button{min-height:44px}}

/* Quiet recommendation hierarchy: text only, normal weight. */
html body #pfRoot .pf-reference-recommendation .pf-advisor-summary{font-size:12px!important;font-weight:400;color:var(--muted,#667085)}
html body #pfRoot .pf-reference-recommendation .pf-advisor-result{font:inherit;color:color-mix(in srgb,var(--ink,#24364b) 65%,#69a49a)}
/* Single-combination allocation editor. */
html #pfRoot .pf-allocation-toolbar{display:flex;align-items:center;gap:14px;padding:6px 0;flex-wrap:wrap;border-bottom:1px solid var(--line)}
html #pfRoot .pf-allocation-toolbar>strong{margin-right:auto}
html #pfRoot .pf-allocation-toolbar label{display:flex;align-items:center;gap:5px;font-size:12px}
html #pfRoot .pf-allocation-toolbar input[type=number]{width:58px}
html #pfRoot .pf-reference-presets{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px 0}
html #pfRoot .pf-reference-presets button[aria-pressed=true]{color:#a75417;border-color:#c99872;background:#fff8f1}
html #pfRoot .pf-reference-side{width:auto;max-width:none;padding:8px 10px;background:transparent;border:1px solid var(--line);margin:0 0 8px}
html #pfRoot .pf-reference-window{display:flex;align-items:end;gap:10px;margin:5px 0}
html #pfRoot .pf-reference-window label{font-size:12px;display:grid;gap:3px}
html #pfRoot .pf-reference-window input[type=number]{width:72px}
html #pfRoot .pf-reference-side small{color:var(--muted);font-size:11px;margin-left:12px}
html #pfRoot .pf-member-legend{display:flex;flex-wrap:wrap;gap:12px;font-size:12px;margin:6px 0}
html #pfRoot .pf-member-legend span{border-left:3px solid var(--member-color);padding-left:5px}
html #pfRoot .pf-matrix-caption{font-size:12px;font-weight:600;padding:6px 0}
html #pfRoot .pf-matrix-caption span{font-weight:400;color:var(--muted);margin-left:12px}
html #pfRoot .pf-matrix th,html #pfRoot .pf-matrix td{padding:5px 7px;font-size:12px;vertical-align:middle;white-space:nowrap}
html #pfRoot .pf-matrix tbody th{font-weight:400;text-align:left}
html #pfRoot .pf-matrix tbody th span{display:block;font-size:11px;color:var(--muted)}
html #pfRoot .pf-share-cell{display:flex;align-items:center;gap:4px}
html #pfRoot .pf-percent{display:flex;align-items:center;gap:2px}
html #pfRoot .pf-percent input[type=number]{width:62px!important;font-size:12px!important;text-align:right;appearance:textfield;padding:3px}
html #pfRoot .pf-percent input::-webkit-inner-spin-button{appearance:none;margin:0}
html #pfRoot .pf-percent input[readonly]{background:transparent;color:var(--muted);border-color:transparent}
html #pfRoot .pf-percent>span{font-size:11px;color:var(--muted)}
html #pfRoot button.pf-lock{width:22px;height:24px;min-height:24px;padding:3px;border:0;background:transparent;opacity:.55}
html #pfRoot button.pf-lock[aria-pressed=true]{opacity:1;background:#eef1f4}
html #pfRoot .pf-lock img{width:14px;height:14px;display:block}
html #pfRoot .pf-allocation-note{display:grid;gap:4px;font-size:12px;margin-top:12px}
html #pfRoot .pf-allocation-note textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:54px;font:inherit;padding:7px;border:1px solid var(--line);background:var(--card);color:var(--ink)}
html #pfRoot .pf-allocation-footer{display:flex;justify-content:flex-end;margin:8px 0 16px}
html #pfRoot .pf-history-note{font-size:11px;color:var(--muted);grid-column:1 / -1;white-space:pre-wrap}

.pf-setup-list h2 .pf-history-hint{margin-left:4px;font-size:12px;font-weight:400;color:var(--pf-muted,#667085);line-height:1.5}

html #pfRoot #pfSearch{display:block;width:144px;max-width:100%;height:26px;min-height:26px;margin:0 0 8px;padding:3px 7px;font-size:12px;line-height:18px}
html #pfRoot .pf-confirm-hint{font-size:12px;font-weight:400;color:var(--muted,#667085);line-height:1.5;max-width:75%;overflow-wrap:anywhere}html #pfRoot .pf-allocation-footer{align-items:center;gap:12px}

html #pfRoot #pfDrop.pf-drop-empty{background:color-mix(in srgb,var(--action-focus,#b97733) 12%,var(--pf-card,#fff));border:1px dashed color-mix(in srgb,var(--action-focus,#b97733) 45%,var(--pf-line,#ddd));border-radius:6px;padding:12px;min-height:132px}
html #pfRoot #pfDrop.pf-drop-empty .pf-drop-hint{display:grid;place-content:center;min-height:100px;padding:16px;background:transparent;border:0;color:var(--ink,#283541)}
html #pfRoot #pfDrop.pf-drop-empty .pf-drop-hint p{color:inherit}

/* Compact percent cells: aligned figures with the lock inside the lower corner. */
html #pfRoot .pf-matrix .pf-share-cell{position:relative;display:block;width:72px;padding:0 0 10px;box-sizing:border-box}
html #pfRoot .pf-matrix .pf-percent{gap:2px}
html #pfRoot .pf-matrix .pf-percent input[type=number],html #pfRoot .pf-matrix .pf-percent output{width:58px!important;min-width:0;box-sizing:border-box;text-align:right;padding:3px;font-variant-numeric:tabular-nums}
html #pfRoot .pf-matrix .pf-percent output{display:block;border:1px solid transparent}
html #pfRoot .pf-matrix button.pf-lock{position:absolute;left:0;bottom:0;width:14px;min-width:14px;height:14px;min-height:14px;padding:2px;border-radius:2px;line-height:10px}
html #pfRoot .pf-matrix .pf-lock img{width:10px;height:10px}
html #pfRoot .pf-matrix .pf-lock:disabled{opacity:.65}
html #pfRoot .pf-matrix .pf-lock:focus-visible{outline:2px solid var(--action-focus,#8f6b45);outline-offset:1px}
html #pfRoot .pf-history-time{font-size:11px;color:var(--muted,#667085);white-space:nowrap;font-variant-numeric:tabular-nums}

html #pfRoot[data-step="2"] .pf-family>.pf-history-time,html #pfRoot[data-step="2"] .pf-family>.pf-history-note{display:block}
html #pfRoot .pf-setup-list .pf-family:has(.pf-history-time){grid-template-columns:minmax(140px,210px) minmax(0,1fr) auto}
@media(max-width:700px){html #pfRoot .pf-setup-list .pf-family:has(.pf-history-time){grid-template-columns:minmax(100px,30%) minmax(0,1fr)}html #pfRoot .pf-history-time{grid-column:1 / -1}}

/* Custom historical windows stay in the right reference panel. */
html #pfRoot .pf-allocation-layout.with-reference{grid-template-columns:minmax(0,1fr) 360px;align-items:start;gap:12px}
html #pfRoot .pf-reference-side{position:sticky;top:72px;min-width:0;box-sizing:border-box;max-height:calc(100dvh - 90px);overflow:auto;background:var(--pf-card);padding:10px;margin:0;border:1px solid var(--pf-line);border-radius:4px}
html #pfRoot .pf-reference-caption{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}
html #pfRoot .pf-reference-window{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 62px 22px;gap:6px;padding:10px 0}
html #pfRoot .pf-reference-window label{min-width:0}html #pfRoot .pf-reference-window input[type=month],html #pfRoot .pf-reference-window input[type=number]{min-width:0;width:100%;box-sizing:border-box;font-size:12px}
html #pfRoot .pf-reference-side small{display:block;margin:8px 0 0;line-height:1.5}
@media(max-width:1000px){html #pfRoot .pf-allocation-layout.with-reference{grid-template-columns:minmax(0,1fr)}html #pfRoot .pf-reference-side{position:fixed;right:16px;top:76px;width:min(360px,calc(100vw - 32px));z-index:90}}

html #pfRoot .pf-exit-note{font-size:12px;line-height:1.5;color:var(--muted);border-left:2px solid #b99b73;padding-left:8px;margin:8px 0}html #pfRoot .pf-exit-note p{margin:3px 0}html #pfRoot .pf-exit-note strong{font-weight:500;color:var(--ink)}

html #pfRoot .pf-setup-list .pf-family.pf-selected{background:var(--surface-2,#edf2f7);box-shadow:inset 3px 0 var(--primary,#54728c)}

.pf-history-search{width:min(360px,100%);box-sizing:border-box;margin:0 0 8px;font-size:12px;padding:5px 8px}
