/* D-049: shared role mapping for the active appearance and historical explicit previews. */
html[data-palette] .topbar{background:var(--p-header);color:var(--p-headerInk)}
html[data-palette] .topbar .brand{color:var(--p-brand)}
html[data-palette] .topbar .brand-dot{color:var(--p-brand)}
html[data-palette] .topbar .return-label,html[data-palette] .topbar .return-label strong,html[data-palette] .topbar .local-pill{color:var(--p-headerMuted)}
html[data-palette] .topbar .icon-button{color:var(--p-headerInk);background:var(--p-context);border-color:transparent}
html[data-palette] nav button[aria-current]{background:var(--p-navSelected);color:var(--p-navSelectedInk)}
html[data-palette] nav button[aria-current] .stage-icon{color:var(--p-navSelectedInk)}@media(hover:hover) and (pointer:fine){
html[data-palette] nav button:hover{background:var(--p-navHover)}}
html[data-palette] .option{background:var(--p-optionSurface)}@media(hover:hover) and (pointer:fine){
html[data-palette] .option:hover{background:var(--p-optionHover)}}
html[data-palette] .option:active{background:var(--p-optionPressed)}
html[data-palette] .option.selected{background:var(--p-selected);border-color:var(--p-border);color:var(--p-selectedInk);box-shadow:none}
html[data-palette] .button.primary{border-color:transparent}@media(hover:hover) and (pointer:fine){
html[data-palette] .button.primary:hover:not(:disabled){color:var(--p-onHover,var(--p-onAction))}}
html[data-palette] .button.primary:active:not(:disabled){background:var(--p-pressed);color:var(--p-onPressed,var(--p-onAction))}
html[data-palette] .button.secondary{background:var(--p-secondarySurface);color:var(--p-secondaryInk);border-color:transparent}@media(hover:hover) and (pointer:fine){
html[data-palette] .button.secondary:hover:not(:disabled){background:var(--p-secondaryHover);color:var(--p-linkHover)}}
html[data-palette] .button.secondary:active:not(:disabled){background:var(--p-secondaryPressed);color:var(--p-onPressed)}
html[data-palette] .button.quiet{color:var(--p-quietInk)}
html[data-palette] .document-icon{background:var(--p-iconFill);color:var(--p-icon)}
html[data-palette] .source-context,html[data-palette] .evidence-context{background:var(--p-context);color:var(--p-contextInk);border-color:var(--p-line)}
html[data-palette] .task-card,html[data-palette] .source-list{background:var(--p-card)}
html[data-palette] .actions.action-dock{background:var(--p-dock)}
html[data-palette] input:not([type=checkbox]):not([type=radio]),html[data-palette] select{background:var(--p-fieldSurface);color:var(--p-fieldInk)}
html[data-palette] h1{color:var(--p-heading)}
html[data-palette] .evidence-sheet{background:var(--p-dialogSurface)}
html[data-palette] dialog::backdrop{background:var(--p-scrim)}
html[data-palette=taxfix] .single-task h1{background:var(--p-headingFill);padding:16px 20px;border-radius:0 24px 24px 24px}
/* Functional art follows decorative roles; brand green never supplies a status claim. */
html[data-palette] .topic-mark{background:var(--p-iconFill);color:var(--p-icon)}
@media(forced-colors:active){html[data-palette] .option.selected{outline:2px solid Highlight}}
html[data-palette] .document-first .known-context{background:var(--p-context);color:var(--p-contextInk);border-color:var(--p-line)}
html[data-palette] .document-first .known-context>.icon{color:var(--p-contextIcon)}@media(hover:hover) and (pointer:fine){
html[data-palette] .document-first .choice:hover{background:var(--p-optionHover);border-color:var(--p-border)}}
html[data-palette] .document-first .choice:active{background:var(--p-optionPressed)}
html[data-palette] .document-first .choice>.icon{color:var(--p-icon)}
html[data-palette] .document-first .fact-option:has(input:checked){background:var(--p-selected);border-color:var(--p-border)}
html[data-palette] .tag{background:var(--p-context);color:var(--p-contextInk)}
html[data-palette] .stage-menu{background:var(--p-navPanel);}
html[data-palette] nav button{color:var(--p-navInk)}
html[data-palette] nav button[aria-current]{color:var(--p-navSelectedInk)}
html[data-palette] .action-dock>.secondary:first-child{background:transparent;border-color:transparent;color:var(--p-quietInk)}

/* D-019: the text/logo lockup follows the same selected palette. */
html[data-palette] .topbar .brand-symbol{color:var(--p-brand)}
/* The global header has its own foreground pair, including optional dark Tala chrome. */
html[data-palette] .topbar .help-button,html[data-palette] .topbar .global-nav button{color:var(--p-headerInk)}@media(hover:hover) and (pointer:fine){
html[data-palette] .topbar .global-nav button[aria-current],html[data-palette] .topbar .global-nav button:hover{background:var(--p-navSelected);color:var(--p-navSelectedInk)}}
html[data-palette=forest] .topbar button:focus-visible,html[data-palette=forest] .topbar a:focus-visible{outline-color:var(--p-headerInk)}

/* D-049: the one available tax year is the next action, not a saved-answer state. */
html[data-palette] .document-first .year-content .choice{background:var(--p-action);color:var(--p-onAction);border-color:transparent}
html[data-palette] .document-first .year-content .choice>span,html[data-palette] .document-first .year-content .choice>.icon{color:inherit}@media(hover:hover) and (pointer:fine){
html[data-palette] .document-first .year-content .choice:hover{background:var(--p-hover);color:var(--p-onHover)}}
html[data-palette] .document-first .year-content .choice:active{background:var(--p-pressed);color:var(--p-onPressed)}@media(hover:hover) and (pointer:fine){

/* D-051: source-backed button states; keep D-050 transparent framing. */
html[data-palette] .button.quiet:hover:not(:disabled),
html[data-palette] .action-dock>.secondary:first-child:hover:not(:disabled){background:var(--p-optionHover);color:var(--p-linkHover)}}
html[data-palette] .button.quiet:active:not(:disabled),
html[data-palette] .action-dock>.secondary:first-child:active:not(:disabled){background:var(--p-optionPressed);color:var(--p-onPressed)}@media(hover:hover) and (pointer:fine){
html[data-palette] .topbar .icon-button:hover:not(:disabled){background:var(--p-optionHover);color:var(--p-linkHover);border-color:transparent}}
html[data-palette] .topbar .icon-button:active:not(:disabled){background:var(--p-optionPressed);color:var(--p-onPressed);border-color:transparent}
