/* R4.7 appearance tokens. UI chrome and first-party presentation only; no image filters or authored-content rewrites. */
html[data-theme="light"]{color-scheme:light}html[data-theme="dark"]{color-scheme:dark}
html[data-tpc-appearance-enabled="false"] [data-theme-toggle],.tpc-theme-control[hidden]{display:none!important}
html[data-tpc-surface="website"][data-theme="dark"]{--tfg-ink:#e4efed;--tfg-muted:#aac1c3;--tfg-orange:#ffa386;--tfg-paper:#10212b;--tfg-line:#36505a;--tfg-mint:#1b3c3c;--tfg-soft:#1a303b;--tfg-lilac:#302b45;--tfg-surface:#172e38;--tfg-strong:#d9eee6}
html[data-tpc-surface="website"][data-theme="dark"] :is(.tfg-pill,.tfg-btn,.tfg-dropdown,.tfg-window,.tfg-card,.tfg-screen,.tfg-starter-option,.tfg-page-preview,.tfg-filter,.tfg-search,.tfg-plan,.tfg-compare,.tfg-release-step,.tfg-connector,.tfg-contents,.tfg-split-note,.tfg-contact-card,.tfg-skip){background:var(--tfg-surface);color:var(--tfg-ink);border-color:var(--tfg-line)}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-header{background:rgba(16,33,43,.98);border-color:var(--tfg-line)}
html[data-tpc-surface="website"][data-theme="dark"] :is(.tfg-top-note,.tfg-section.dark){background:#0b1820;color:#e1eeeb}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-top-note a{color:#ffb29a}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-section.white{background:var(--tfg-paper)}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-float{background:rgba(23,46,56,.97);border-color:#45616a;color:var(--tfg-ink)}
html[data-tpc-surface="website"][data-theme="dark"] :is(.tfg-glyph,.tfg-ribbon,.tfg-connector-mark,.tfg-avatar){background:#25473f;color:#d1e8dd}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-pill.orange{background:#462d27;color:#ffd4c2;border-color:#755041}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-pill.green{background:#1c3f33;color:#b5e3c9;border-color:#3d6955}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-btn.primary{background:#b9381d;border-color:#da6346;color:#fff}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-btn.primary:hover{background:#a62f18}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-btn.ink{background:var(--tfg-strong);border-color:var(--tfg-strong);color:#102e3a}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-btn:hover{border-color:#93b7b4}
html[data-tpc-surface="website"][data-theme="dark"] :is(.tfg-checks span:before,.tfg-list li:before,.tfg-plan li:before){color:#9fd4ba}
html[data-tpc-surface="website"][data-theme="dark"] :is(.tfg-window-bar,.tfg-editor-tools,.tfg-screen-nav,.tfg-mail-sidebar,.tfg-compare th,.tfg-demo-note,.tfg-demo-editor){background:#1a343d;color:var(--tfg-muted);border-color:var(--tfg-line)}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-editor-tools span{background:#203c46;border-color:var(--tfg-line)}
html[data-tpc-surface="website"][data-theme="dark"] :is(.tfg-window-dot,.tfg-control-range){background:#45645f}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-editor-top{border-color:var(--tfg-line)}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-editor-top .save{color:#9fd4ba}
html[data-tpc-surface="website"][data-theme="dark"] :is(.tfg-cta,.tfg-starter-option:first-child){background:#302d2c}
html[data-tpc-surface="website"][data-theme="dark"] :is(.tfg-filter[aria-pressed="true"],.tfg-demo-tabs a:first-child,.tfg-demo-tabs span:first-child){background:#daeae4;border-color:#daeae4;color:#17332f}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-mobile-links a:hover{background:#24413f}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-contents li{border-color:var(--tfg-line)}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-page-preview .name:after{color:#a7bcb5}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-search::placeholder{color:#a9bec3;opacity:1}
html[data-tpc-surface="website"][data-theme="dark"] .tfg-code{border:1px solid #36505a}
/* The miniature sample website and template previews retain their own authored palettes. */
html[data-tpc-surface="studio"][data-theme="dark"]{--paper:#192b3b;--wash:#101c29;--navy:#e6edf6;--ink:#e6edf6;--text:#e6edf6;--muted:#adbed0;--line:#3c4f63;--accent:#ffb092;--action:#ffb092;--action-hover:#ffc7b0;--tint:#3b2d2b;--surface:#192b3b;--soft:#213548;--tpc-text:#e6edf6;--tpc-muted:#adbed0;--tpc-line:#3c4f63;--tpc-card:#192b3b;background:var(--wash);color:var(--navy)}
html[data-tpc-surface="studio"][data-theme="dark"] #tp-studio{--tp-paper:#192b3b;--tp-wash:#101c29;--tp-text:#e6edf6;--tp-muted:#adbed0;--tp-line:#3c4f63;--tp-accent:#ffb092;--tp-accent-hover:#ffc7b0;--tp-tint:#3b2d2b}
html[data-tpc-surface="studio"][data-theme="dark"] .tfs44-builder{--tfs44-accent:#c0b2ff;--tfs44-soft:#332d4d;--tfs44-paper:#192b3b;--tfs44-ink:#e6edf6;--tfs44-muted:#adbed0;--tfs44-line:#3c4f63}
html[data-tpc-surface="studio"][data-theme="dark"] #tp-studio :is(.tp-studio-toolbar,.tp-studio-header,.tp-header,.tp-library,.tp-inspector,.tp-panel-tabs,.tp-page-meta,.tp-seo-fields,.tp-dialog,.tp-start-error,.tp-media-choice,.gjs-field,.gjs-block,.gjs-sm-sector,.gjs-sm-sector .gjs-sm-sector-title,.gjs-sm-properties,.gjs-clm-tags){background:var(--tp-paper);color:var(--tp-text);border-color:var(--tp-line)}
html[data-tpc-surface="studio"][data-theme="dark"] #tp-studio :is(.tp-tool-group,.tp-toolbar-tabs,.tp-panel-hint,.tp-canvas-loading){color:var(--tp-muted)}
html[data-tpc-surface="studio"][data-theme="dark"] #tp-studio :is(.tp-btn,.tp-document select,.tp-segmented button.is-active,.tp-seo-fields input,.tp-seo-fields textarea,.tp-dialog input,.tp-dialog textarea,.tp-dialog select,.gjs-field input,.gjs-field select){background:var(--tp-paper);color:var(--tp-text);border-color:var(--tp-line)}
html[data-tpc-surface="studio"][data-theme="dark"] #tp-studio :is(.tp-editor-main,.tp-segmented,.tp-code-panel,.gjs-editor,.gjs-cv-canvas){background:var(--tp-wash)}
html[data-tpc-surface="studio"][data-theme="dark"] #tp-studio :is(.tp-btn:hover:not(:disabled),.gjs-block:hover){background:#294156;border-color:#7891aa}
html[data-tpc-surface="studio"][data-theme="dark"] #tp-studio .tp-btn-primary{background:#b9381d;color:#fff;border-color:#da6346}
html[data-tpc-surface="studio"][data-theme="dark"] #tp-studio .tp-btn-primary:hover:not(:disabled){background:#a62f18}
html[data-tpc-surface="studio"][data-theme="dark"] #tp-studio .tp-save-state.is-dirty{color:#f3cf87}
html[data-tpc-surface="studio"][data-theme="dark"] #tp-studio :is(.tp-danger,.tp-dialog-error){color:#ffc1b4}
html[data-tpc-surface="studio"][data-theme="dark"] :is(.tpc-login-form-panel,.tpc-dialog,.tpc-card,.tpc-media-card,.tpc-table-wrap,.tpc-stat){background:var(--paper);color:var(--navy);border-color:var(--line)}
html[data-tpc-surface="studio"][data-theme="dark"] :is(.tpc-login-page,.tpc-admin) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){background:#132333;color:var(--navy);border-color:#51677f}
html[data-tpc-surface="studio"][data-theme="dark"] :is(.tpc-login-page,.tpc-admin) .tpc-button-primary{background:#b9381d;color:#fff;border-color:#da6346}
.tpc-appearance-settings{margin-block:24px}.tpc-appearance-settings>p{max-width:76ch}.tpc-appearance-area{min-width:0;margin:8px 0 0;padding:20px;border:1px solid var(--line,#dce3eb);border-radius:10px}.tpc-appearance-area legend{padding-inline:8px;font-weight:700}.tpc-appearance-area .tpc-field{min-width:0}.tpc-appearance-area select{max-width:100%}.tpc-appearance-settings [data-appearance-status]{min-height:1.6em}
@media(max-width:680px){.tpc-appearance-settings .tpc-grid-two{grid-template-columns:minmax(0,1fr)}.tpc-appearance-area{padding:16px}}
@media(prefers-reduced-motion:reduce){.tpc-theme-control,.tfg-btn{transition:none!important}}
/* Small action labels and focus rings retain contrast in either appearance. */
html[data-tpc-surface="website"]{--tfg-focus:#a62f18}
html[data-tpc-surface="website"][data-theme="dark"]{--tfg-focus:#ffa386}
html[data-tpc-surface="website"][data-theme="light"] .tfg-btn.primary{background:#b9381d;border-color:#b9381d;color:#fff}
html[data-tpc-surface="website"][data-theme="light"] .tfg-btn.primary:hover{background:#a62f18}
html[data-tpc-surface="website"] :is([data-tfg-commercial],.tfg-header,.tfg-footer) :is(button,a,input,select,summary):focus-visible{outline:3px solid var(--tfg-focus);outline-offset:4px}
html[data-tpc-surface="studio"] :is(button,a,input,select,textarea,summary,[contenteditable]):focus-visible{outline:3px solid #7154a5;outline-offset:3px}
html[data-tpc-surface="studio"][data-theme="dark"] :is(button,a,input,select,textarea,summary,[contenteditable]):focus-visible{outline-color:#c0b2ff}
html[data-tpc-surface="studio"][data-theme="dark"] :is(.tpc-login-page,.tpc-admin) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){border-color:#667f96}
html[data-tpc-surface="website"] :is([data-theme-toggle],.tpc-return-admin):focus-visible{outline:3px solid var(--tfg-focus);outline-offset:4px}
html[data-tpc-surface="studio"] #tp-studio :is(button,a,input,select,textarea,summary,[contenteditable]):focus-visible{outline:3px solid #7154a5;outline-offset:3px}
html[data-tpc-surface="studio"][data-theme="dark"] #tp-studio :is(button,a,input,select,textarea,summary,[contenteditable]):focus-visible{outline-color:#c0b2ff}
