:root{color-scheme:light;--bg:#f7f7f7;--panel:#fff;--panel-2:#f1f1f1;--line:#e0e0e0;--text:#202020;--muted:#666666;--faint:#808080;--lime:#202020;--theme-surface:#fff;--theme-soft:#f1f1f1;--theme-muted:#666666;--theme-border:#d9d9d9;--theme-header:#fffffff5;--theme-selected:#ededed;--theme-selected-border:#ccc;--theme-button:#202020;--theme-button-text:#fff;--theme-button-hover:#000;--theme-focus:#555;--theme-focus-ring:#00000010;--theme-shadow:#00000018;--theme-backdrop:#00000055}
:root[data-theme="dark"]{color-scheme:dark;--bg:#111;--panel:#191919;--panel-2:#222;--line:#333;--text:#ededed;--muted:#aaa;--faint:#888;--lime:#ededed;--theme-surface:#1b1b1b;--theme-soft:#252525;--theme-muted:#a5a5a5;--theme-border:#383838;--theme-header:#151515f5;--theme-selected:#303030;--theme-selected-border:#555;--theme-button:#e5e5e5;--theme-button-text:#151515;--theme-button-hover:#fff;--theme-focus:#aaa;--theme-focus-ring:#ffffff18;--theme-shadow:#00000055;--theme-backdrop:#00000088}
.theme-toggle{display:inline-grid;place-items:center;flex:none;width:32px;height:32px;padding:6px;border:1px solid var(--theme-border);border-radius:6px;background:transparent;color:var(--text);cursor:pointer}
.theme-toggle:hover{background:var(--theme-soft);color:var(--lime)}
.theme-toggle:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
.theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.theme-icon-sun{display:none}
[data-theme="dark"] .theme-icon-sun{display:block}
[data-theme="dark"] .theme-icon-moon{display:none}

/* Shared interface rules use the selected grayscale palette; images retain their original colors. */
:root .site-header{background:var(--theme-header);border-color:var(--line)}
:root :is(.catalog-sidebar,.community-boards,.account-settings-nav,.admin-sidebar,.admin-topbar,.admin-body,.subcategory-nav){background:var(--bg);border-color:var(--line)}
:root :is(.resource-card,.auth-panel,.account-panel,.community-compose,.community-article,.community-post-card-shell,.community-replies,.community-reply-form,.admin-panel,.admin-stat-card,.admin-submission-card,.submission-form,.submission-empty,.detail-info,.flow-card,.flow-start,.flow-end,.sidebar-note,.account-confirm-dialog,.account-confirm-backdrop .account-confirm-card){background:var(--theme-surface);border-color:var(--theme-border);color:var(--text)}
:root :is(.resource-card:hover,.admin-panel .admin-submission-card,.flow-output,.flow-node,.search-box,.brand-symbol,.flow-start-icon,.flow-end>span,.account-avatar,.admin-avatar,.markdown-toolbar,.markdown-editor,.markdown-preview,.markdown-preview pre,.community-article-content pre,.community-reply-body pre){background:var(--theme-soft);border-color:var(--theme-border)}
:root :is(.auth-panel,.account-confirm-dialog,.account-confirm-backdrop .account-confirm-card){box-shadow:0 12px 40px var(--theme-shadow)}
:root :is(.auth-form input,.account-field input,.account-community-edit-form textarea,.community-field input,.community-field select,.community-field textarea,.community-admin-field input,.submission-field input,.submission-field select,.submission-field textarea,.markdown-editor textarea,.markdown-input){background:var(--theme-surface);border-color:var(--theme-border);color:var(--text)}
:root .account-field input[readonly]{background:var(--theme-soft);color:var(--theme-muted)}
:root .search-box input{color:var(--text)}
:root :is(input,textarea)::placeholder{color:var(--faint)}
:root :is(.category-link:hover,.community-board-link:hover,.account-settings-nav a:hover,.admin-nav>a:hover,.community-main-column .community-post-card:hover,.subcategory-link:hover){background:var(--theme-soft);color:var(--text)}
:root :is(.category-link.active,.subcategory-link.active,.community-board-link.active,.account-settings-nav a.selected,.admin-nav>a.active,.admin-status-tabs a.active,.subcategory-filter button.active){background:var(--theme-selected);border-color:var(--theme-selected-border);color:var(--text)}
:root :is(.category-count,.subcategory-link span,.sidebar-version,.sidebar-version span,.note-caption,.category-icon,.search-icon,.card-arrow,.category-expand,.sidebar-heading,.sidebar-heading span,.catalog-topline,.result-count,.provider,.pricing,.catalog-footer,.back-link,.category-intro p,.card-summary,.detail-hero p,.detail-copy p,.detail-info small,.info-row span,.account-center-breadcrumb,.account-center-intro p,.account-info-row,.account-settings-description,.account-field small,.account-community-count,.account-community-row-main p,.account-community-row-main small,.account-comment-meta,.account-comment-meta a,.account-community-empty,.community-heading p,.community-post-meta,.community-article-meta,.community-boards h2,.community-replies-heading>span,.community-replies-empty,.community-empty,.community-empty p,.community-empty-board,.community-compose-title p,.markdown-help,.markdown-editor-status,.auth-intro,.auth-switch,.auth-footnote,.profile-avatar-upload p,.submission-intro p,.submission-empty,.admin-panel-heading p,.admin-panel-heading>span,.admin-sidebar-label,.admin-sidebar-bottom a,.admin-topbar-caption,.admin-topbar-user,.admin-table-secondary,.admin-table-external,.admin-data-table th,.workflow-breadcrumb,.workflow-eyebrow,.workflow-summary,.flow-purpose,.flow-detail-grid ul,.flow-output p,.flow-tools>span,.flow-step-count,.flow-loop,.workflow-hero p){color:var(--theme-muted)}
:root :is(.top-nav-link,.account-link,.account-chip,.submit-link,.community-account,.account-center-header,.category-link,.subcategory-link,.community-board-link,.account-settings-nav a,.admin-nav>a,.admin-brand,.resource-kind,.card-tags span,.detail-tags span,.info-row b,.account-info-row strong,.account-shortcut strong,.account-field label,.account-community-title,.account-community-parent,.account-comment-content,.account-community-edit-context,.community-field label,.community-admin-field label,.community-post-card h3,.community-article-meta strong,.community-article-content,.community-reply-content strong,.community-reply-content p,.community-reply-body,.community-feed-heading h2,.community-compose-title h2,.community-replies-heading h2,.auth-form label,.submission-field label,.admin-table-primary,.admin-data-table td,.admin-stat-card>strong,.admin-user-info strong,.admin-quick-links strong,.flow-detail-grid h3,.flow-start strong,.flow-end strong){color:var(--text)}
:root :is(.resource-card h2,.detail-hero h1,.detail-copy h2,.account-settings-title h2,.account-account-info h2,.account-shortcuts-panel h2,.account-community-heading h2,.community-article h1,.community-empty h3,.empty-state h2,.submission-intro h1,.admin-panel-heading h2,.admin-section-heading h2,.admin-topbar>div:first-child strong,.admin-quick-links h2,.admin-submission-top h2,.workflow-hero h1,.flow-card h2,.account-confirm-card h2){color:var(--text)}
:root :is(.account-confirm-card p,.account-panel-label,.resource-kind,.card-tags span,.detail-tags span){color:var(--theme-muted)}
:root :is(.category-group-row>.category-link:hover~.category-expand,.top-nav-link.active,.active .category-icon,.category-link.active,.category-link.active .category-count,.active .subcategory-link span,.flow-phase,.flow-tool-link,.pricing,.category-kicker,.submission-category){color:var(--lime)}
:root :is(.account-community-edit,.account-community-delete,.review-button,.review-actions button,.subcategory-filter button,.community-write-link,.community-post-reply-link,.community-reply-action,.community-reply-cancel,.markdown-toolbar button,.markdown-toolbar a,.markdown-mode-toggle button,.profile-avatar-button,.account-confirm-actions button){background:var(--theme-surface);border-color:var(--theme-border);color:var(--text)}
:root :is(.auth-submit,.account-primary-button,.community-submit,.community-admin-button,.review-actions .review-approve,.visit-button){background:var(--theme-button);border-color:var(--theme-button);color:var(--theme-button-text)}
:root :is(.auth-submit:hover,.account-primary-button:hover,.community-submit:hover,.community-admin-button:hover,.visit-button:hover){background:var(--theme-button-hover);color:var(--theme-button-text)}
:root :is(.account-community-delete,.review-reject,.account-confirm-actions .account-confirm-delete){color:var(--text);border-color:var(--theme-selected-border);background:var(--theme-soft)}
:root :is(.account-confirm-actions .account-confirm-delete:hover,.account-community-delete:hover){background:var(--theme-selected);color:var(--text)}
:root :is(.community-notice,.account-community-notice,.submission-success,.message-toast){background:var(--theme-surface);border-color:var(--theme-selected-border);color:var(--text)}
:root :is(.submission-status,.admin-role-badge,.admin-content-status,.admin-table-category,.resource-subkind,.community-board-tag){background:var(--theme-soft);border-color:var(--theme-border);color:var(--theme-muted)}
:root :is(.submission-status.rejected,.admin-content-status.unpublished){background:var(--theme-soft);color:var(--theme-focus);border-color:var(--theme-border)}
:root :is(.auth-error,.field-error,.field-validation-error,.account-field span.field-validation-error,.community-field span,.community-admin-field span){color:var(--text)}
:root :is(.markdown-preview code,.community-article-content code,.community-reply-body code){background:var(--theme-soft);color:var(--text)}
:root :is(.community-pagination a,.account-community-pagination a,.account-community-pagination button){background:var(--theme-surface);border-color:var(--theme-border);color:var(--theme-muted)}
:root :is(.community-pagination a.active,.account-community-pagination a.active,.account-community-pagination button.active){background:var(--theme-selected);border-color:var(--theme-selected-border);color:var(--text)}
:root :is(.admin-data-table td,.admin-data-table th,.admin-table-scroll,.admin-table-list,.admin-row-actions,.admin-user-row,.admin-sidebar,.admin-brand,.admin-sidebar-bottom,.admin-topbar,.admin-mobile-nav,.admin-status-tabs,.account-settings-title,.account-community-heading,.account-community-row,.community-post-card,.community-replies-heading,.community-reply-item,.community-article-meta,.community-post-breadcrumb,.community-post-reply-link,.markdown-toolbar,.flow-detail-grid,.flow-tools,.card-footer,.info-row,.subcategory-nav,.account-shortcut,.review-actions,.admin-quick-links>a){border-color:var(--line)}
:root .admin-data-table thead{background:var(--theme-soft)}
:root :is(.admin-data-table tbody tr:hover,.admin-status-tabs a:hover){background:var(--theme-soft)}
:root .admin-mobile-nav{background:var(--theme-surface)}
:root .account-confirm-backdrop{background:var(--theme-backdrop)}
:root .account-confirm-dialog::backdrop{background:var(--theme-backdrop)}
:root :is(.workflow-overview h2,.workflow-overview-copy strong){color:var(--text)}
:root :is(.workflow-overview h2 span,.workflow-overview-copy small,.workflow-hero-main>p,.workflow-footer){color:var(--theme-muted)}
:root .workflow-overview>a{border-color:var(--line);color:var(--text)}
:root .markdown-toolbar>span.markdown-toolbar-divider{background:var(--line)}
:root :is(.community-feed,.community-hot-sidebar){background:var(--theme-surface);border-color:var(--theme-border)}
:root :is(.community-hot-heading h2,.community-hot-post strong){color:var(--text)}
:root :is(.community-hot-empty,.community-hot-post small){color:var(--theme-muted)}
:root :is(.result-count b,.crumb-current,.markdown-preview h1,.markdown-preview h2,.markdown-preview h3,.markdown-content h1,.markdown-content h2,.markdown-content h3,.community-login-prompt strong,.community-hot-item strong){color:var(--text)}
:root :is(.sidebar-note p,.community-login-prompt small,.community-hot-meta,.community-hot-title){color:var(--theme-muted)}
:root :is(.resource-mark,.detail-mark){color:var(--text);background:var(--theme-soft);border-color:var(--theme-border)}
:root :is(.community-login-prompt,.community-reply-target){background:var(--theme-soft);border-color:var(--theme-border);color:var(--text)}
:root .markdown-toolbar button.markdown-mode.active{background:var(--theme-selected);border-color:var(--theme-selected-border);color:var(--text)}
@media(max-width:680px){.header-right{gap:9px}.theme-toggle{width:29px;height:29px;padding:5px}:root .catalog-sidebar{background:var(--theme-surface)}}
:root :is(.account-register,.submit-link,.resource-kind,.card-tags span,.detail-tags span,.search-box kbd,.flow-tool-link,.flow-loop,.flow-output,.flow-node,.brand-symbol,.account-avatar,.admin-avatar){border-color:var(--theme-border)}
:root .resource-card::before,:root :is(.provider i,.status-label i,.workflow-eyebrow span){background:var(--faint);box-shadow:none}
:root .flow-rail::before,:root .flow-rail::after,:root .flow-loop::before{border-color:var(--theme-selected-border)}
:root :is(.flow-rail,.flow-start-arrow,.workflow-overview-range,.flow-start small,.flow-end small,.community-hot-rank,.flow-end>span){color:var(--theme-muted)}
:root :is(input,textarea,select):focus{border-color:var(--theme-focus);box-shadow:0 0 0 2px var(--theme-focus-ring)}
:root :is(.account-confirm-symbol,.community-hot-item:hover,.flow-tool-link:hover,.account-register:hover,.community-reply-login:hover,.community-post-reply-link:hover){background:var(--theme-soft);border-color:var(--theme-selected-border);color:var(--text)}
:root :is(.resource-card:hover,.account-community-edit:hover,.review-button:hover,.submit-link:hover,.profile-avatar-button:hover,.markdown-toolbar button:hover){border-color:var(--theme-selected-border);color:var(--text)}
:root :is(.clear-search,.copy-button){background:var(--theme-soft);border-color:var(--theme-border);color:var(--text)}
:root :is(.clear-search:hover,.copy-button:hover,.markdown-toolbar button:hover,.subcategory-filter button:hover,.community-write-link:hover,.account-confirm-actions button:hover){background:var(--theme-selected);border-color:var(--theme-selected-border);color:var(--text)}
