/* Shared display tokens. Light keeps the existing product design; dark is opt-in/system-resolved. */
:root{--rfs-page:#f8f9fc;--rfs-surface:#fff;--rfs-raised:#f4f1fb;--rfs-text:#202039;--rfs-muted:#68647d;--rfs-line:#e2ddec;--rfs-accent:#7250d5;--rfs-input:#fff;color-scheme:light}
html[data-rfs-theme=dark]{--rfs-page:#11121c;--rfs-surface:#1b1d2c;--rfs-raised:#262638;--rfs-text:#f1eff8;--rfs-muted:#b6b3c8;--rfs-line:#3a374d;--rfs-accent:#baa5ff;--rfs-input:#151722;color-scheme:dark;background:var(--rfs-page)}
/* The control is part of the header, never a floating obstruction over the editor. */
body .rfs-settings-trigger{display:inline-flex;flex:0 0 44px;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:10px;margin:0;border:1px solid var(--rfs-line);border-radius:13px;background:var(--rfs-surface);color:var(--rfs-text);cursor:pointer;box-shadow:0 2px 10px #24193b08}
body .rfs-settings-trigger svg,body :is(#rfs-preferences,#rfs-install-dialog) svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body .rfs-settings-trigger:hover{border-color:var(--rfs-accent);color:var(--rfs-accent)}
body .rfs-settings-trigger:focus-visible,body :is(#rfs-preferences,#rfs-install-dialog) :focus-visible{outline:3px solid var(--rfs-accent);outline-offset:3px}
body .rfs-settings-fallback{display:flex;justify-content:flex-end;max-width:1100px;margin:auto;padding:16px 24px 0}
body .rfs-has-settings{flex-wrap:wrap}
body .topbar.rfs-has-settings{height:auto;min-height:104px;padding-block:16px;gap:16px}
body :is(#rfs-preferences,#rfs-install-dialog){width:430px;max-width:calc(100% - 28px);max-height:calc(100dvh - 36px);margin:auto;padding:26px;overflow:auto;border:1px solid var(--rfs-line);border-radius:24px;background:var(--rfs-surface);color:var(--rfs-text);box-shadow:0 24px 90px #08081266;font:14px/1.6 Inter,system-ui,sans-serif;text-align:left;box-sizing:border-box}
body :is(#rfs-preferences,#rfs-install-dialog)::backdrop{background:#0a091599;backdrop-filter:blur(5px)}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-preferences-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:24px}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-preferences-eyebrow{font-size:10px;font-weight:750;letter-spacing:1.5px;color:var(--rfs-accent);margin:0 0 5px}
body :is(#rfs-preferences,#rfs-install-dialog) h2{font-size:23px;line-height:1.2;letter-spacing:-.6px;margin:0;color:var(--rfs-text)}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-preferences-close{flex:0 0 44px;width:44px;height:44px;min-height:44px;margin:-9px -10px 0 0;padding:0;border:0;border-radius:12px;background:transparent;color:var(--rfs-muted);font:28px/1 system-ui;cursor:pointer}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;border:0;padding:0;margin:0;min-width:0}
body :is(#rfs-preferences,#rfs-install-dialog) legend{font:700 13px/1.5 Inter,system-ui;color:var(--rfs-text);padding:0;margin-bottom:10px}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-theme-choice{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;min-width:0;padding:14px 4px 12px;margin:0;border:1px solid var(--rfs-line);border-radius:14px;background:var(--rfs-surface);color:var(--rfs-text);font:650 12px/1.4 Inter,system-ui;cursor:pointer}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-theme-choice:has(input:checked){border-color:var(--rfs-accent);box-shadow:0 0 0 1px var(--rfs-accent);background:var(--rfs-raised)}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-theme-choice:has(input:focus-visible){outline:3px solid var(--rfs-accent);outline-offset:3px}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-theme-choice input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;padding:0;cursor:pointer}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-theme-swatch{display:grid;place-items:center;width:46px;height:42px;border:1px solid #7773;border-radius:10px;margin:0}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-theme-swatch-auto{background:linear-gradient(90deg,#f1edf9 50%,#252535 50%);color:#8f6de0}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-theme-swatch-light{background:#faf8ff;color:#7052ae}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-theme-swatch-dark{background:#252535;color:#d4c0ff}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-preferences-note{font:400 12px/1.6 Inter,system-ui;margin:13px 0 24px;color:var(--rfs-muted)}
body #rfs-install-slot{border-top:1px solid var(--rfs-line);padding-top:20px;margin-top:0}
body #rfs-install-slot:empty{display:none}
body :is(#rfs-preferences,#rfs-install-dialog) [hidden]{display:none!important}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-install-title{font-size:16px;line-height:1.4;color:var(--rfs-text);margin:0 0 7px;font-weight:750}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-install-description,body :is(#rfs-preferences,#rfs-install-dialog) .rfs-install-status{font-size:12px;line-height:1.65;color:var(--rfs-muted);margin:8px 0}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-install-button{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin:13px 0 0;padding:11px 15px;border:1px solid var(--rfs-line);border-radius:11px;background:var(--rfs-raised);color:var(--rfs-accent);font:700 13px/1.4 Inter,system-ui;cursor:pointer}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-install-button:disabled{opacity:.6;cursor:wait}
body :is(#rfs-preferences,#rfs-install-dialog) .rfs-preferences-done{display:block;width:100%;min-height:46px;padding:12px 18px;margin:24px 0 0;background:#7650d6;color:#fff;border:0;border-radius:12px;font:750 14px/1.5 Inter,system-ui;cursor:pointer}
@media(max-width:760px){body .topbar.rfs-has-settings{min-height:83px;gap:10px}body .topbar.rfs-has-settings>.brand{margin-right:auto}body .topbar.rfs-has-settings>.rfs-settings-trigger{order:1}body .topbar.rfs-has-settings>[data-connect]{order:2}body .topbar.rfs-has-settings>.header-account{order:3}}
@media(max-width:680px){body.rfs-mobile-ui .site-nav .rfs-settings-trigger{order:0;margin-left:auto}body.rfs-mobile-ui .site-nav>.account{order:2}body :is(#rfs-preferences,#rfs-install-dialog){padding:22px}body .rfs-settings-fallback{padding:14px 16px 0}}
/* Dark component overrides: explicit surfaces preserve images, videos and brand colors. */
html[data-rfs-theme=dark] body{background:var(--rfs-page)!important;color:var(--rfs-text)!important;--background-color:var(--rfs-page);--card-background:var(--rfs-surface);--text-color:var(--rfs-text);--subtle-text:var(--rfs-muted);--border-color:var(--rfs-line);--muted:var(--rfs-muted);--ink:var(--rfs-text);--line:var(--rfs-line);--soft:var(--rfs-raised);--white:var(--rfs-surface);--violet:var(--rfs-accent)}
html[data-rfs-theme=dark] body :is(h1,h2,h3,h4,legend){color:var(--rfs-text)}
html[data-rfs-theme=dark] body :is(.brand,.rfs-brand,.instagram-word,.file-copy strong,.template-gallery .brand,.blog-entry h2 a,.blog-content h2,.blog-content h3){color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body a:not(.primary,.cta,.button,.persona-hot-cta,.compare-template,.template-use,.template-instagram-cta,.hero-cta,.rfs-share-social){color:var(--rfs-accent)}
html[data-rfs-theme=dark] body :is(.eyebrow,h1>span,.account-meta strong,.m-intro h1 span,.template-credit a){color:var(--rfs-accent)}
html[data-rfs-theme=dark] body :is(.hero-copy>p,.hero-block p,.intro,.lead,.hero-trial,.updated,.scope-note,.grid p,.examples figcaption,details p,.blog-meta,.blog-content,.feature-ideas p,.templates-intro>p,.templates-toolbar>p,.template-card p,.template-source>p,.template-editor-intro>p,.template-category,.template-hero-clock,.template-hero-status,.template-hero-demo figcaption div>span,.template-hero-face-copy>span,.template-hero-face-copy small,.section-intro,.field-hint,.destination p,.price-note,.help-section p:not(.eyebrow),.dialog-note,.local-note,.status,.hero-notes,.preview-topline span){color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body :is(.card,.how-card,.faq,.price-card,.template-card,.blog-entry,.blog-empty,.panel,.metric,.stat,.editor,.workspace-preview,.requirements-card,.finish-preview,.workflow-grid article,.job-result,.example-card,.proof-card,.guide-card,.use-case-grid>div,.operator-card){background:var(--rfs-surface)!important;border-color:var(--rfs-line)!important;box-shadow:0 4px 20px #05050d14}
html[data-rfs-theme=dark] body :is(header,footer,fieldset,details,.trust-strip,.how-section,.proof-strip,.blog-post-heading,.video-review,.compare-extras,.source-tabs,.currency-tools,.m-options,.m-examples,.auth-footer){border-color:var(--rfs-line)!important}
html[data-rfs-theme=dark] body :is(p,small,li,figcaption,dt,dd){border-color:var(--rfs-line)}
html[data-rfs-theme=dark] body small{color:var(--rfs-muted)}
html[data-rfs-theme=dark] body :is(input:not([type=radio],[type=checkbox],[type=range],[type=file]),select,textarea){background:var(--rfs-input)!important;color:var(--rfs-text)!important;border-color:var(--rfs-line)!important}
html[data-rfs-theme=dark] body :is(input,textarea)::placeholder{color:#9390a8;opacity:1}
html[data-rfs-theme=dark] body input:autofill{box-shadow:0 0 0 100px var(--rfs-input) inset;-webkit-text-fill-color:var(--rfs-text)}
html[data-rfs-theme=dark] body :is(.file-picker,.upload,.profile-choice,.clip-controls,.photo-preview,.image-preview,.file-picker.has-file,.reference-preview-banner,.saved-media,.template-source,.template-empty,.templates-bottom,.template-hero-faces,.template-hero-demo,.template-hero-face-result,.blog-content .blog-toc,.blog-content blockquote,.blog-content pre,.blog-content code,.persona-hot-feature){background:var(--rfs-raised)!important;border-color:var(--rfs-line)!important;color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body :is(.file-icon,.upload-symbol,.step,.workflow-number,.destination-icon,.template-hero-face-add,.template-trend-badge,.template-classic-badge){background:#342c4d!important;color:#d1baff!important}
html[data-rfs-theme=dark] body :is(.file-copy span,.file-browse,.upload small,.template-empty p,.templates-bottom p,.template-hero-face-result strong,.persona-hot-feature .persona-hot-subtitle){color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body :is(.mode-option,.mode):not(.persona-hot-surface){background:var(--rfs-input)!important;border-color:var(--rfs-line)!important;color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body :is(.mode-option,.mode):not(.persona-hot-surface):has(input:checked){background:#2b2443!important;border-color:#a58ae9!important;box-shadow:0 0 0 1px #a58ae955}
html[data-rfs-theme=dark] body .mode-option:not(.persona-hot-surface)>span,html[data-rfs-theme=dark] body .mode:not(.persona-hot-surface) b{color:var(--rfs-accent)}
html[data-rfs-theme=dark] body .mode-option:not(.persona-hot-surface) small,html[data-rfs-theme=dark] body .mode:not(.persona-hot-surface) small{color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body :is(.mode-tag,.pill,.stage,.facts span,.template-pills span,.preview-pill,.audio-note,.audio-option,.persona-note,.likeness-note,.media-consent,.m-free,.m-explainer,.m-summary,.m-all-templates,.welcome-offer,.preview-note,.disclosure,.currency-tools label){background:var(--rfs-raised)!important;border-color:var(--rfs-line)!important;color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body :is(.tabs,.source-tabs){background:var(--rfs-input)!important}
html[data-rfs-theme=dark] body :is(.tabs button,.source-tabs button,.example-modes button:not(.persona-hot-surface),.template-filters button,.template-collections button,.compare-controls button,.compare-sound,.account button:not(.primary),.secondary,#new,#googleLogin,.template-reset,.template-change){background:var(--rfs-raised)!important;border-color:var(--rfs-line)!important;color:var(--rfs-accent)!important}
html[data-rfs-theme=dark] body :is(.tabs button[aria-selected=true],.source-tabs button[aria-selected=true],.template-filters button[aria-pressed=true],.template-collections button[aria-pressed=true],.example-modes button[aria-pressed=true]:not(.persona-hot-surface)){background:#3a2d58!important;color:#e2d5ff!important;box-shadow:inset 0 0 0 1px #a085d3}
html[data-rfs-theme=dark] body :is(.primary,.cta:not(.persona-hot-cta),.button:not(.secondary),.compare-template,.template-use){color:#fff!important}
html[data-rfs-theme=dark] body dialog:not(:is(#rfs-preferences,#rfs-install-dialog)){background:var(--rfs-surface)!important;color:var(--rfs-text)!important;border-color:var(--rfs-line)!important;box-shadow:0 24px 90px #0008}
html[data-rfs-theme=dark] body dialog::backdrop{background:#05050dcc}
html[data-rfs-theme=dark] body :is(.auth-divider,.auth-footer,.auth-footer p,dialog p,.video-review p,.audio-option small,.saved-media p){color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body .auth-divider:before,html[data-rfs-theme=dark] body .auth-divider:after{background:var(--rfs-line)}
html[data-rfs-theme=dark] body :is(.error,.review-error,.m-error,.start-error,.start-error small){color:#ffb1c1!important}
html[data-rfs-theme=dark] body .start-error{background:#36202d!important;border-color:#9f5b72!important}
html[data-rfs-theme=dark] body :is(.availability-note,.warning,.staging-note){background:#332b20!important;border-color:#7b6744!important;color:#ecd0a6!important}
html[data-rfs-theme=dark] body :is(.steps li,.steps li.active,.steps li.done){background:var(--rfs-raised);border-color:var(--rfs-line);color:var(--rfs-muted)}
html[data-rfs-theme=dark] body :is(.steps li.active,.steps li.done){color:#d6c7ff;border-color:#a58ae9}
html[data-rfs-theme=dark] body :is(th,td,.blog-table){border-color:var(--rfs-line)!important}
html[data-rfs-theme=dark] body th{background:var(--rfs-raised)!important;color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body :is(footer,.payment-reassurance,.currency-note,.consent-note,.template-gallery footer){color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body .video-review .rating-choice span{color:#b7afca}
html[data-rfs-theme=dark] body .video-review .rating-choice.rated span{color:#f5bb60}
html[data-rfs-theme=dark] body .cookie-notice{background:var(--rfs-surface)!important;border-color:var(--rfs-line)!important;color:var(--rfs-text)!important;box-shadow:0 12px 60px #0008}
html[data-rfs-theme=dark] body .cookie-notice :is(p,small,label){color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body .cookie-notice :is(h2,strong){color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body .cookie-notice button:not(.cookie-accept){background:var(--rfs-raised);color:var(--rfs-text);border-color:var(--rfs-line)}
html[data-rfs-theme=dark] body[data-rfs-page=legal] main{background:var(--rfs-surface)!important;border-color:var(--rfs-line)!important}
html[data-rfs-theme=dark] body[data-rfs-page=legal] :is(p,li,small){color:var(--rfs-muted)}
/* Mobile's legacy inline rules have deliberately higher specificity. */
html[data-rfs-theme=dark] body.rfs-mobile-ui .m-panel{background:var(--rfs-surface);border-color:var(--rfs-line)}
html[data-rfs-theme=dark] body.rfs-mobile-ui :is(.m-mode-copy,.m-mode-copy>strong,.m-template,.m-template>strong,.m-panel>h2){color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body.rfs-mobile-ui :is(.m-short,.m-intro>p,.m-help,.m-meta,.m-disclosure,.m-gallery-note,.m-template-cost,.m-no-charge,.m-explainer>p,.m-explainer dt,.m-explainer dd,.m-options summary,.m-sticky span,.m-free small,.m-nav a,#mTemplateStatus,#photoHint,#sourceClipHint,#pcStatus,#processingTime,.media-consent,#mMedia label[for=face],#urlGroup label,#uploadGroup>label){color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body.rfs-mobile-ui :is(.m-free strong,.m-sticky strong,.m-summary strong,.m-all-templates,.m-all-templates small,#mMedia .file-copy strong){color:var(--rfs-accent)!important}
html[data-rfs-theme=dark] body.rfs-mobile-ui .m-mode-copy .m-badge:not(.hot-badge),html[data-rfs-theme=dark] body.rfs-mobile-ui .m-nav b{background:#352c4b;color:#d8c4ff}
html[data-rfs-theme=dark] body.rfs-mobile-ui .m-sticky{background:#1b1d2cf5;border-color:var(--rfs-line);box-shadow:0 -6px 24px #0002}
html[data-rfs-theme=dark] body.rfs-mobile-ui #balance{background:var(--rfs-raised);color:#d8c4ff;border-color:var(--rfs-line)}
html[data-rfs-theme=dark] body.rfs-mobile-ui #form{background:none!important}
html[data-rfs-theme=dark] body.rfs-mobile-ui #mMedia .file-picker{background:var(--rfs-input)!important;border-color:#6e5d90!important}
html[data-rfs-theme=dark] body.rfs-mobile-ui #mMedia .file-picker.has-file{background:#1c302a!important;border-color:#4f8e76!important}
html[data-rfs-theme=dark] body.rfs-mobile-ui :is(#mMedia .file-copy span,#mMedia .file-browse){color:var(--rfs-muted)}
html[data-rfs-theme=dark] body.rfs-mobile-ui #mMedia .file-icon{background:#342c4d;color:#d1baff}
html[data-rfs-theme=dark] body.rfs-mobile-ui .persona-hot-surface .m-mode-copy,html[data-rfs-theme=dark] body.rfs-mobile-ui .persona-hot-surface .m-mode-copy>strong{color:#fff5eb!important}
html[data-rfs-theme=dark] body.rfs-mobile-ui .persona-hot-surface .m-short{color:#dfd0c9!important}
/* Fanvue remains a separate, unchanged processing/payment workflow. */
html[data-rfs-theme=dark] body[data-rfs-page=fanvue] :is(.header-wallet,.profile-choice,.clip-controls,.upload,.editor,.workspace-preview,.requirements-card,.finish-preview,.price-card,.job-result,.review-summary,.photo-choice,.welcome-offer){background:var(--rfs-surface)!important;border-color:var(--rfs-line)!important;color:var(--rfs-text)}
html[data-rfs-theme=dark] body[data-rfs-page=fanvue] :is(.canvas,.clip-preview,.profile-note,.preview-note){background:var(--rfs-raised)!important;color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body[data-rfs-page=fanvue] :is(.requirements-card span,.consent,.price-card .credit-count,.price-card .pack-detail,.price-card .price small,.workflow-grid p,.finish-preview-note,.upload small){color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body[data-rfs-page=fanvue] :is(.requirements-card strong,.preview-note strong,.profile-choice strong,.price-card .price){color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body[data-rfs-page=fanvue] .button.secondary{background:var(--rfs-raised)!important;color:var(--rfs-accent)!important;border-color:var(--rfs-line)!important}
@media(display-mode:standalone){body .site-nav,body .topbar{padding-top:max(14px,env(safe-area-inset-top))}body .rfs-settings-fallback{padding-top:max(14px,env(safe-area-inset-top))}}
/* Legacy marketing, checkout and result components use their own literal colors. */
html[data-rfs-theme=dark] body :is(.usage-proof,.usage-proof.usage-milestone){background:linear-gradient(120deg,#262039,#1b1d2c)!important;border-color:var(--rfs-line)!important}
html[data-rfs-theme=dark] body :is(.guide-grid a,.pack-choice,.payment-provider,.purpose-note,.summary,.template-skip,.blog-skip,.skip,.template-hero-play,.template-hero-sound,.output-option:has(input:checked),.wallet-note,.rfs-tag){background:var(--rfs-raised)!important;color:var(--rfs-text)!important;border-color:var(--rfs-line)!important}
html[data-rfs-theme=dark] body .pack-choice:has(input:checked){background:#352a4e!important;color:#e2d5ff!important;border-color:#ad8fee!important}
html[data-rfs-theme=dark] body :is(.usage-milestone-label,.pack-prompt,.value-anchor,.price,.rfs-share-dialog h3){color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body :is(.usage-milestone-number,.usage-counts dd,.header-wallet strong,.quote-note){color:var(--rfs-accent)!important}
html[data-rfs-theme=dark] body :is(.usage-proof p,.usage-counts dt,.pack-audience,.guide-grid span,.use-case-grid p,.templates-launch-copy p,.hero-photo-hint,#detail,#availability,#jobPlayerNotice,.placeholder,.testimonial,.quote){color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body :is(.template-use,.rfs-create,.button:not(.secondary,.persona-hot-cta)){background:#7650d6!important;color:#fff!important}
html[data-rfs-theme=dark] body .templates-launch h2,html[data-rfs-theme=dark] body .templates-launch-banner h2{color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body #rfsShare{background:var(--rfs-surface)!important;border-color:var(--rfs-line)!important;color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body #rfsShare :is(h3,p,summary){color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body #rfsShare :is(.rfs-share-hint,.rfs-share-status){color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body #rfsShare :is(.rfs-copy-output,.rfs-share-dialog){background:var(--rfs-raised)!important;color:var(--rfs-text)!important;border-color:var(--rfs-line)!important}
html[data-rfs-theme=dark] body #rfsShare button:not(.rfs-social,.rfs-share-primary),html[data-rfs-theme=dark] body #rfsShare .rfs-share-actions a{background:var(--rfs-raised)!important;color:var(--rfs-accent)!important;border-color:var(--rfs-line)!important}
html[data-rfs-theme=dark] body #rfsShare .rfs-share-secondary a{color:var(--rfs-accent)!important}
html[data-rfs-theme=dark] body #jobResultActions .links a:not(#download){background:var(--rfs-raised)!important;border-color:var(--rfs-line)!important;color:var(--rfs-accent)!important}
html[data-rfs-theme=dark] body #jobResultActions .links #download{color:#fff!important}
html[data-rfs-theme=dark] body[data-rfs-page=admin] :is(nav a,header a,button:not(.primary,.rfs-preferences-done)){background:var(--rfs-raised);color:var(--rfs-accent);border-color:var(--rfs-line)}
html[data-rfs-theme=dark] body[data-rfs-page=admin] .error{background:#36202d;border-color:#9f5b72}
html[data-rfs-theme=dark] body[data-rfs-page=admin] svg text{fill:var(--rfs-muted)}
html[data-rfs-theme=dark] body .templates-launch-link{background:linear-gradient(120deg,#302342,#1b1d2c)!important;border-color:var(--rfs-line)!important}
html[data-rfs-theme=dark] body .persona-prices span{background:var(--rfs-raised)!important;color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body .hero-compare-hint{color:var(--rfs-accent)!important}

html[data-rfs-theme=dark] body :is(#closeAuth,.close-dialog,.dialog-close,.auth-close){background:var(--rfs-raised)!important;color:var(--rfs-text)!important;border-color:var(--rfs-line)!important}
html[data-rfs-theme=dark] body .template-hero-demo figcaption strong{color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body .templates-launch-eyebrow{color:var(--rfs-accent)!important}
@media(max-width:760px){body:is(.template-gallery,.blog-page)>header.rfs-has-settings{flex-direction:row;align-items:center;gap:16px}body:is(.template-gallery,.blog-page)>header.rfs-has-settings>.brand{margin-right:auto}body:is(.template-gallery,.blog-page)>header.rfs-has-settings>nav{flex-basis:100%;order:2}body:is(.template-gallery,.blog-page)>header.rfs-has-settings>.rfs-settings-trigger{margin-left:auto}}
html[data-rfs-theme=dark] body #elapsed{color:var(--rfs-muted)!important}

@media(max-width:380px){body .topbar.wallet-visible.rfs-has-settings>.brand{max-width:calc(100% - 60px);flex:1 1 auto}}

/* Installation is a first-level action, separate from appearance preferences. */
body .rfs-app-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
body .rfs-install-trigger{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;margin:0;padding:10px 12px;border:1px solid var(--rfs-line);border-radius:12px;background:var(--rfs-raised);color:var(--rfs-accent);font:700 12px/1.3 Inter,system-ui,sans-serif;white-space:nowrap;cursor:pointer}
body .rfs-install-trigger svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body .rfs-install-trigger:hover{border-color:var(--rfs-accent)}
body .rfs-install-trigger:focus-visible{outline:3px solid var(--rfs-accent);outline-offset:3px}
body .rfs-install-trigger[hidden]{display:none!important}
body .rfs-install-trigger:disabled{opacity:.65;cursor:wait}
body #rfs-install-dialog #rfs-install-slot{padding:0;border:0}
body #rfs-install-dialog .rfs-install-description{font-size:14px;line-height:1.7}
body .rfs-settings-fallback{gap:8px}
@media(max-width:760px){body .rfs-has-settings>.rfs-app-actions{margin-left:auto}body .topbar.rfs-has-settings>.rfs-app-actions{order:1}body:is(.template-gallery,.blog-page)>header.rfs-has-settings{column-gap:8px}}
@media(max-width:680px){body.rfs-mobile-ui .site-nav>.rfs-app-actions{order:0}body.rfs-mobile-ui .rfs-app-actions .rfs-settings-trigger{margin-left:0}}
@media(max-width:360px){body .rfs-app-actions{gap:6px}body .rfs-install-trigger{font-size:11px;padding-inline:8px;gap:4px}body .rfs-install-trigger svg{width:14px;height:14px}body .rfs-has-settings>.brand{font-size:16px}body .rfs-has-settings>.brand>img{width:28px;height:28px}}
/* Free-preview states are conditional on account eligibility; keep every state readable. */
html[data-rfs-theme=dark] body :is(.ultra-trial,.preview-upgrade){background:var(--rfs-raised)!important;border-color:#705c9e!important;color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body .ultra-trial:has(#ultraPreview:checked){background:#2b2443!important;border-color:#b49aee!important}
html[data-rfs-theme=dark] body .ultra-trial :is(label,#previewLabel){color:var(--rfs-text)!important}
html[data-rfs-theme=dark] body .ultra-trial :is(p,small),html[data-rfs-theme=dark] body .preview-upgrade{color:var(--rfs-muted)!important}
html[data-rfs-theme=dark] body :is(#ultraPreviewStatus,#previewVerifyStatus){color:#d9c9ff!important}
html[data-rfs-theme=dark] body .ultra-trial input{accent-color:#b49aee}
html[data-rfs-theme=dark] body .ultra-trial button{background:#7650d6!important;color:#fff!important}
html[data-rfs-theme=dark] body :is(.ultra-trial,.preview-upgrade) a{color:var(--rfs-accent)!important}
html[data-rfs-theme=light] body .ultra-trial small{color:#606078}
