/* Shared typography: clearer text without changing the semantic status colours. */
:root,
html[data-pcbem-theme="light"] {
    --pt-text: #293d59;
    --pt-muted: #536580;
    --pt-link: #3454be;
}
html[data-pcbem-theme="intermediate"] {
    --pt-text: #24364e;
    --pt-muted: #455975;
    --pt-link: #304ca8;
}
html[data-pcbem-theme="dark"] {
    --pt-text: #f0f4fc;
    --pt-muted: #c0cde1;
    --pt-link: #b9caff;
}
body {
    color: var(--pt-text, #293d59);
    font-weight: 400;
}
body :is(p, li, td, input, textarea, select, .form-control, .select2-selection__rendered, .select2-results__option) {
    font-weight: 400;
}
body :is(h1, h2, h3, h4, h5, h6, th, label, .card-header, .modal-title,
    .btn, .dropdown-item, .nav-link, .section-nav-link, .topbar-create-action,
    .pcbem-status-secondary, .pcbem-page-heading h1, .dashboard-panel-title) {
    font-weight: 700 !important;
}
body :is(strong, b, .dashboard-metric strong) { font-weight: 700; }
body :is(.table, .form-control, .pcbem-template-table, .pcbem-clients-table) {
    color: var(--pt-text, #293d59);
}
body :is(.text-muted, .dropdown-header, .help-block, .form-text,
    .text-gray-400, .text-gray-500, .text-gray-600, small,
    .pcbem-page-heading p, .dashboard-metric-label, .dashboard-panel-subtitle,
    .pcbem-feedback-note, .pcbem-version-summary, .pcbem-version-notice) {
    color: var(--pt-muted, #536580) !important;
    font-weight: 400;
}
body :is(.table thead th, .pcbem-template-table th, .pcbem-clients-table th) {
    color: var(--pt-text, #293d59) !important;
}
body :is(.pcbem-template-table td, .pcbem-clients-table td) {
    color: var(--pt-text, #293d59);
}
body :is(input, textarea)::placeholder {
    color: var(--pt-muted, #536580);
    opacity: 1;
    font-weight: 400;
}
body .form-control:disabled,
body .form-control[readonly] { opacity: 1; }
body :is(.section-nav-link, .topbar-create-action, .pcbem-filter-toggle,
    .pcbem-status-secondary, .pcbem-store-toggle, .pcbem-feedback-caption) {
    font-weight: 700;
}
body :is(.section-nav-link, .topbar-create-action) {
    color: var(--pt-link, #3454be);
}
body :is(.client-name-pastel, .pcbem-clients-table .name,
    .pcbem-section-nav .section-nav-link:not(.active)) {
    color: var(--pt-link, #3454be);
    font-weight: 700;
}
body #accordionSidebar .nav-item:not(.active) > .nav-link,
html[data-pcbem-theme] body #accordionSidebar .nav-item:not(.active) > .nav-link {
    color: var(--pt-muted, #536580) !important;
}
body #accordionSidebar :is(.nav-link span, .collapse-item) { font-weight: 700; }
body .pcbem-template-archive-label { font-weight: 700; }
body .pcbem-email-templates .pcbem-template-table tr.template-archived > td {
    color: #655b43;
}
html[data-pcbem-theme="dark"] body .pcbem-email-templates .pcbem-template-table tr.template-archived > td {
    background: #373327;
    color: #e4d7b7;
}
body a:focus-visible, body button:focus-visible,
body input:focus-visible, body select:focus-visible, body textarea:focus-visible {
    outline: 2px solid var(--pt-link, #3454be);
    outline-offset: 2px;
}

/* Personal typography: system fonts, preserving icon fonts. */
html[data-user-font="segoe"] {--user-font:"Segoe UI",Arial,sans-serif;}
html[data-user-font="arial"] {--user-font:Arial,Helvetica,sans-serif;}
html[data-user-font="verdana"] {--user-font:Verdana,Arial,sans-serif;}
html[data-user-font="tahoma"] {--user-font:Tahoma,Arial,sans-serif;}
html[data-user-font="calibri"] {--user-font:Calibri,"Segoe UI",Arial,sans-serif;}
html[data-user-font="trebuchet"] {--user-font:"Trebuchet MS",Arial,sans-serif;}
html[data-user-font="georgia"] {--user-font:Georgia,"Times New Roman",serif;}
html:not([data-user-font="default"]) :is(body,input,select,textarea,button,h1,h2,h3,h4,h5,h6,p,td,th,label,a,.select2-selection__rendered) {font-family:var(--user-font)!important;}
html[data-user-size="11"] {--user-size:11px;}
html[data-user-size="12"] {--user-size:12px;}
html[data-user-size="13"] {--user-size:13px;}
html[data-user-size="14"] {--user-size:14px;}
html[data-user-size="15"] {--user-size:15px;}
html[data-user-size="16"] {--user-size:16px;}
html[data-user-size="17"] {--user-size:17px;}
html[data-user-size="18"] {--user-size:18px;}
html:not([data-user-size="default"]) :is(body,input,select,textarea,button,p,td,th,label,a,.select2-selection__rendered) {font-size:var(--user-size)!important;}
.pcbem-profile-panel .pcbem-readable-warning {color:#835000!important;background:#fff4d8;padding:8px;border-radius:6px;}
.pcbem-profile-panel :is(label,.card-label,.text-orange,.text-yellow) {color:var(--pt-text,#263449)!important;}
.pcbem-typography-settings {padding:16px;}
.pcbem-typography-settings label {display:block;margin:12px 0 6px;}
.pcbem-typography-settings select {width:100%;}

/* Consistent UI weights: regular data and controls, bold headings only.
   Semantic bold inside authored rich text remains available. */
html body #wrapper :is(p,li,td,input,textarea,select,button,label,a,time,small,span,div,summary,.form-control,.select2-selection__rendered,.select2-results__option):where(:not(i):not([class^="fa-"]):not(.fa):not(.fas):not(.far):not(.fab):not([class^="ac3-"])) {
    font-weight:400!important;
}
html body #wrapper :is(td,.card-body,.modal-body) :is(b,strong) {font-weight:400!important;}
html body #wrapper :is(h1,h2,h3,h4,h5,h6,th,.card-header,.modal-title,.dropdown-header,.dashboard-panel-title,.pcbem-page-heading h1),
html body #wrapper :is(h1,h2,h3,h4,h5,h6,th,.card-header,.modal-title,.dropdown-header,.dashboard-panel-title) :is(a,span,p,strong,b,div) {
    font-weight:700!important;
}

/* Preserve formatting deliberately written in notes and rich-text editors. */
html body #wrapper .modal.notes [data-text] :is(strong,b),
html body #wrapper [contenteditable="true"] :is(strong,b) {font-weight:700!important;}

html body #wrapper :is(.card-header,th) :is(input,select,textarea,button,.select2-selection__rendered,.select2-selection__placeholder),
html body #wrapper :is(.card-header,th) :is(button,.select2-selection__rendered) span {font-weight:400!important;}
