/* Shared component recipes: refer to design-tokens.css; no local palette. */
body{background-color:var(--ef-page-bg);color:var(--ef-text);}
/* One authoritative default backdrop for home, catalog, and reader. */
body::before{background:var(--ef-page-backdrop);}
body #site-header.header.literary-header.adaptive-header{background:color-mix(in srgb, var(--ef-page-bg) 96.86%, transparent);border-color:transparent;color:var(--ef-text);}
body #site-header.header.literary-header.adaptive-header.is-compact{background:color-mix(in srgb, var(--ef-page-bg) 92.94%, transparent);border:1px solid var(--ef-border);}
@media(max-width:760px){body #site-header.header.literary-header.adaptive-header{border:0;}body #site-header.header.literary-header.adaptive-header.is-compact{border:0;}}
body #site-header.adaptive-header.literary-header .workshop-brand,body #site-header.adaptive-header.literary-header .workshop-brand>span{color:var(--ef-text);}
body #site-header.adaptive-header.literary-header .header-navigation>a{color:var(--ef-muted);}
body #site-header.adaptive-header.literary-header .header-navigation>a:is(:hover,[aria-current]){color:var(--ef-accent-strong);}
body #site-header.adaptive-header.literary-header .header-navigation>a[aria-current]::after{background:var(--ef-accent);}
body #site-header.adaptive-header.literary-header .header-icon-button{color:var(--ef-quiet);}
body #site-header.adaptive-header.literary-header .header-account-image{background:color-mix(in srgb, var(--ef-accent) 3.92%, transparent);border-color:var(--ef-border);color:var(--ef-quiet);}
body .header-popover,body :is(.custom-select-panel,.custom-control-panel){background:var(--ef-surface-deep);border-color:color-mix(in srgb,var(--ef-white) 9%,transparent);color:var(--ef-text);}
body :is(.header-popover a,.custom-select-option){color:var(--ef-quiet);}
body :is(.header-popover a:hover,.custom-select-option:hover){background:var(--ef-hover);color:var(--ef-text);}
body :is(.directory-shell,.account-page,.reading-shelf-page,.music-page){--accent:var(--ef-accent);--muted:var(--ef-muted);}
body :is(.directory-heading p,.catalog-intro>p,.journal-caption,.catalog-selects label,.work-card .article-meta,.work-card p,.directory-card p,.book-description,.book-status,.standalone-intro>p,.publication-breadcrumb,.original-source){color:var(--ef-muted);}
body :is(.search-box,.catalog-selects select,.custom-control-trigger,.custom-select-trigger){background:var(--ef-surface);border-color:var(--ef-border);color:var(--ef-text);}
body :is(.works-navigation,.directory-tabs,.section-heading,.related-publications){border-color:var(--ef-border);}
body :is(.works-navigation,.directory-tabs) a{color:var(--ef-muted);}
body :is(.works-navigation,.directory-tabs) a:is(:hover,[aria-current]){color:var(--ef-accent-strong);}
body :is(.work-card.article,.directory-card,.account-card,.reading-shelf-card){background-color:var(--ef-surface);border-color:var(--ef-border);}
body :is(.work-card.article,.directory-card,.reading-shelf-card):hover{border-color:var(--ef-accent);}
body .portal-cta{background:var(--ef-accent);border-color:var(--ef-accent);color:var(--ef-accent-ink);}
body .portal-cta:hover{background:var(--ef-accent-strong);border-color:var(--ef-accent-strong);color:var(--ef-accent-ink);}
/* Calm shared actions, deliberately derived from the homepage portal-cta.
   No broad .primary rule: editorial/custom-profile controls retain their semantics. */
body :is(.button,.profile-button,.qw-actions button,.qw-dialog-footer button,.profile-editor-footer button){border-radius:var(--ef-action-radius);box-shadow:none;transition:var(--ef-action-motion);}
body :is(.button.primary,.qw-primary,.profile-editor-footer .primary){background:var(--ef-action-fill);border-color:transparent;color:var(--ef-action-on-fill);box-shadow:none;}
body :is(.button.primary,.qw-primary,.profile-editor-footer .primary):hover{background:var(--ef-action-fill-hover);border-color:transparent;color:var(--ef-action-on-fill);transform:none;box-shadow:none;}
body :is(.button:not(.primary),.qw-secondary,.qw-dialog-footer button,.profile-editor-footer button:not(.primary)){background:var(--ef-action-surface);border:1px solid var(--ef-action-border);color:var(--ef-text);}
body :is(.button:not(.primary),.qw-secondary,.qw-dialog-footer button,.profile-editor-footer button:not(.primary)):hover{background:var(--ef-action-hover);border-color:var(--ef-action-border);transform:none;box-shadow:none;}
body .filter.active{background:var(--ef-action-hover);border:1px solid var(--ef-action-border);color:var(--ef-text);box-shadow:none;}
body .round-button{background:var(--ef-action-surface);border:1px solid var(--ef-action-border);box-shadow:none;}
body .round-button:hover{background:var(--ef-action-hover);box-shadow:none;}
body :is(.button,.profile-button,.qw-actions button,.qw-dialog-footer button,.profile-editor-footer button,.round-button,.filter):focus-visible{outline:2px solid var(--ef-accent);outline-offset:3px;}
@media(prefers-reduced-motion:reduce){body :is(.button,.profile-button,.qw-actions button,.qw-dialog-footer button,.profile-editor-footer button,.round-button){transition:none;}}
body :is(.text-link,.read-label,.publication-breadcrumb a:hover){color:var(--ef-accent-strong);}
body :is(.custom-select-option[aria-selected=true],.custom-control-option[aria-selected=true]){background:var(--ef-hover);color:var(--ef-accent-strong);}
body :is(.site-footer,.portal-footer,.footer){border-color:var(--ef-border);color:var(--ef-muted);}
body :is(.site-footer,.portal-footer,.footer) a:hover{color:var(--ef-accent-strong);}
body :is(a,button,input,select,textarea):focus-visible{outline-color:var(--ef-accent);}
@media(max-width:1150px){body #site-header.adaptive-header.literary-header .header-navigation{background:color-mix(in srgb, var(--ef-page-bg) 96.08%, transparent);border-color:var(--ef-border);}}

body #site-header.header-initializing{transition:none!important;}

/* v495: restrained interface typography; authored poem typography stays untouched. */
body #site-header .workshop-brand{letter-spacing:-.025em;text-rendering:optimizeLegibility;}
body #site-header .header-navigation,body #site-header .header-actions{font-kerning:normal;}
body :is(.button,.qw-actions button,.profile-editor-footer button){font-variant-numeric:tabular-nums;letter-spacing:0;}

/* v499: global typography contract; no additional background or decoration. */
html{font-family:var(--ef-font-ui);font-kerning:normal;text-rendering:optimizeLegibility;}
body :is(.button,.qw-actions button,.profile-editor-footer button){font-family:var(--ef-font-ui);font-weight:var(--ef-type-action-weight);line-height:var(--ef-type-leading-control);}
body :is(.header-navigation,.directory-tabs,.studio-library-filters,.inspector-tabs,.profile-editor-tabs){font-family:var(--ef-font-ui);}
