/* One contrast palette for public views, account views and administration.
   Component geometry and operator-authored block colors remain independent. */
:root{
  --portal-cta-default:#b54822;
  --portal-cta-hover-default:#923515;
}
.button.button-orange{background:var(--portal-cta-background,var(--portal-cta-default));color:#fff;border-color:var(--portal-cta-background,var(--portal-cta-default))}
.button.button-orange:hover{background:var(--portal-cta-hover,var(--portal-cta-hover-default));color:#fff;border-color:var(--portal-cta-hover,var(--portal-cta-hover-default))}
.button.button-orange:active{background:#762b13;color:#fff}

html.portal-dark{
  color-scheme:dark;
  --theme-page:#181818;
  --theme-panel:#202020;
  --theme-surface:#2a2a2a;
  --theme-raised:#383838;
  --theme-text:#f5f5f5;
  --theme-muted:#c4c4c4;
  --theme-accent:#ffb18d;
  --theme-focus:#ffda8b;
  --theme-control-border:#9e9e9e;
  --theme-line:#686868;
  --theme-footer:#141414;
  --theme-success:#a1e7b5;
  --theme-success-bg:#203e32;
  --theme-warning:#ffda8b;
  --theme-warning-bg:#4b3520;
  --theme-danger:#ffb6a3;
  --theme-danger-bg:#472c29;
  --paper:var(--theme-panel);
  --wash:var(--theme-page);
  --hero:#242424;
  --line:var(--theme-line);
  --surface:var(--theme-surface);
  --surface-subtle:var(--theme-raised);
  --border:var(--theme-control-border);
  --muted:var(--theme-muted);
  --portal-night-surface:var(--theme-surface);
  --portal-night-raised:var(--theme-raised);
  --portal-night-text:var(--theme-text);
  --portal-night-muted:var(--theme-muted);
  background:var(--theme-page);
  color:var(--theme-text);
}
html.portal-dark body{background:var(--theme-page);color:var(--theme-text)}
html.portal-dark :is(dialog,.site-header,.browse-nav,.portal-header-preferences,.account-root,.admin-root){background:var(--theme-panel);color:var(--theme-text);border-color:var(--theme-line)}
html.portal-dark :is(.discover,.hero,.offers-section,.detail-description,.operation-company-description,.operation-services){color:var(--theme-text)}
html.portal-dark :is(h1,h2,h3,h4,h5,h6,legend){color:inherit}
html.portal-dark :is(.detail-description h3,.info-copy h3,.account-listing-metrics dd,.import-instructions summary){color:var(--theme-text)}
html.portal-dark .site-footer{background:var(--theme-footer);color:var(--theme-text);border-color:var(--theme-line)}
html.portal-dark dialog::backdrop{background:#141414cc}

/* Controls: explicit surfaces avoid a light browser control inside a dark form. */
html.portal-dark :is(input,select,textarea){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-control-border);accent-color:var(--theme-accent)}
html.portal-dark :is(.form-field input,.form-field select,.form-field textarea,.management-form textarea,.management-moderation textarea,.editorial-form textarea,.comm-form textarea,.message-form textarea,.radius-label select,.portal-user-tools select){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-control-border)}
html.portal-dark :is(input,textarea)::placeholder{color:var(--theme-muted);opacity:1}
html.portal-dark :is(input[readonly],textarea[readonly],.account-content .form-field input[readonly],.auth-content input[readonly]){background:var(--theme-raised);color:var(--theme-muted)}
html.portal-dark :is(input,select,textarea) option{background:var(--theme-surface);color:var(--theme-text)}
html.portal-dark input[type=file]{background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-control-border)}
html.portal-dark input[type=file]::file-selector-button{background:var(--theme-raised);color:var(--theme-text);border:1px solid var(--theme-control-border);border-radius:5px;padding:7px 10px;margin-right:10px;cursor:pointer}
html.portal-dark input:-webkit-autofill{-webkit-text-fill-color:var(--theme-text);box-shadow:0 0 0 1000px var(--theme-surface) inset;caret-color:var(--theme-text)}
html.portal-dark :is(.search-bar input,.city-search-label input){background:transparent;color:var(--theme-text)}
html.portal-dark .city-search-label{border-color:var(--theme-control-border);background:var(--theme-surface)}
html.portal-dark :is(.button-outline,.button-dark){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-control-border)}
html.portal-dark :is(.button-outline,.button-dark):hover{background:var(--theme-raised);color:var(--theme-text);border-color:var(--theme-focus)}
html.portal-dark .button.button-orange{border-color:var(--theme-accent);color:#fff}
html.portal-dark .button.button-orange:hover{border-color:var(--theme-focus);color:#fff}
html.portal-dark :is(button,input,select,textarea):disabled{opacity:1;color:var(--theme-muted);background:var(--theme-panel);border-color:var(--theme-line);cursor:not-allowed}
html.portal-dark button.button:disabled,html.portal-dark button.button:disabled:hover{opacity:1;background:var(--theme-panel);color:var(--theme-muted);border-color:var(--theme-line);border-style:dashed;cursor:not-allowed}
html.portal-dark :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--theme-focus);outline-offset:3px}
html.portal-dark :is(.city-search-label,.location-field):focus-within{outline:3px solid var(--theme-focus);outline-offset:3px}
html.portal-dark :is(.auth-content [aria-invalid=true],input[aria-invalid=true],textarea[aria-invalid=true]){border-color:var(--theme-danger)}
html.portal-dark .modal-close{background:var(--theme-raised);color:var(--theme-text);border:1px solid var(--theme-control-border)}
html.portal-dark :is(.toast,.skip-link){background:var(--theme-raised);color:var(--theme-text);border:1px solid var(--theme-control-border)}

/* Neutral text remains readable on the lightest raised dark surface. */
html.portal-dark :is(
  .hero-description,.hero-points,.browse-nav a,.portal-stats span,.field-caption,.search-hints,.search-hints button,
  .category-count,.results-summary,.results-summary .text-link,.sort-label,.card-category,.card-specs,.card-price small,.card-bottom,.demo-note,.empty-state p,.modal-header p,
  .site-footer p,.footer-note,.detail-subtitle,.detail-specs dt,.seller-box p,.form-field small,.checkbox-label,.form-actions p,.info-copy,.mini-card p,.saved-search p,.contact-privacy,
  .detail-tools button,.detail-tools a,.home-company small,.home-directory-empty p,.home-article>p:not(.eyebrow),.home-placement small,.portal-quick-links a,
  .account-identity small,.account-signout,.account-copy,.account-status-tabs button,.account-listing p,.account-listing-actions>a,.account-listing-actions>button,
  .account-empty p,.account-signin p,.account-signin>small,.account-loading,.account-saved-search span,.account-conversation p,.account-message-date,.account-back,
  .account-thread-heading p,.account-message-author,.account-message time,.account-listing-metrics dt,.account-newsletter-check,.account-results-count,.account-pagination>span,
  .account-promotion-status,.account-session p,.account-section-nav a,.account-dashboard-cards small,.account-dashboard-notice p,.account-dashboard-metrics dt,.account-dashboard-metrics>p,.account-dashboard-details p,
  .auth-security,.auth-switch,.auth-legacy,.account-password-actions p,.auth-tabs a,
  .admin-nav-group>span,.admin-counts span,.admin-items article p,.admin-items small,.management-heading p,.management-category-grid p,.management-list p,.management-list small,.management-empty p,
  .admin-breadcrumb,.import-instructions,.import-description,.operation-export small,.operation-company-data dt,.control-table th,.custom-field-values dt,
  .discover-breadcrumbs,.discover-empty p,.discover-loading,.discover-result-count,.discover-company-card p:not(.discover-eyebrow),.discover-card-arrow,.discover-pagination,.discover-back,
  .discover-prose,.discover-contact-card p>span,.discover-report-link,.discover-offers span,.discover-review time,.discover-muted,.discover-consent,
  .discover-place-results button span,.discover-editorial-card>p:not(.discover-eyebrow),.discover-article-next p,.discover-help-strip p,.discover-radio-group small,.discover-price-grid p:not(.discover-eyebrow),
  .discover-directory-card p,.discover-city-grid span,.discover-region-grid .icon,.discover-app-intro p,.discover-app-steps p,
  .publication-policy-form .form-field small,.publication-check,.publication-details dt,.editorial-media small,.downloads-admin-item summary span,.downloads-public-card small,
  .finance-stat-grid span,.comm-caps p,.ad-billing-facts dt,.map-credit,.places-credit,.region-list-details,.place-option small,.place-status,.radius-label small,.location-footer small,
  .sample-toggle,.profile-identity,.geo-summary,.location-header p:last-child,.taxonomy-item small,.listing-documents small,.draft-recovery p,.listing-image-manager small,.recent-listings small
){color:var(--theme-muted)}

/* Low-emphasis icons still identify controls and map options. */
html.portal-dark :is(.account-listing-placeholder,.account-empty-mark,.account-message-avatar,.account-dashboard-cards .icon,.empty-state>.icon,.place-option>span:first-child,.discover-faq summary>span,.discover-directory-card>.icon){color:var(--theme-muted)}
html.portal-dark .hero-points .icon{color:#adcbbd}
html.portal-dark .category-illustration{stroke:var(--theme-muted)}
html.portal-dark .category-card:nth-child(2n) .category-illustration{stroke:#f0bc94}

/* Cards, empties, fieldsets, tables and previews across every module family. */
html.portal-dark :is(
  .category-card,.listing-card,.home-article,.home-company,.home-directory-empty,.home-placement,.search-bar,.filter-panel,.filter-chip,.empty-state,.mini-card,.saved-search,.seller-box,
  .account-listing,.account-saved-search,.account-session,.account-conversation,.account-dashboard-cards>a,.account-dashboard-cards>button,.account-dashboard-notice,.account-thread-heading,.account-message,
  .account-recovery-codes li,.account-totp-secret,
  .admin-counts article,.admin-items article,.management-category-grid article,.management-list>article,.management-empty,.management-chart,.admin-quicklinks button,.admin-nav-search,
  .control-form,.control-menu-row,.downloads-form,.download-edit,.downloads-admin-item,.downloads-public-card,.taxonomy-form,
  .editorial-media,.editorial-variables button,.editorial-template-preview,.finance-stat-grid article,.finance-code-result,
  .comm-form,.comm-caps article,.community-video,.community-scores div,.community-preview,.guest-message-own,.media-hosting .management-form,.media-card,
  .provider-offers article,.ad-billing-terms,.ad-billing-offer,.ad-billing-close,.recovery-progress,.engagement-inquiry,
  .discover-empty,.discover-filter,.discover-company-card,.discover-company-monogram,.discover-contact-card,.discover-place-results button,.discover-editorial-card,.discover-editorial-featured,
  .discover-event-details,.discover-resource,.discover-help-strip,.discover-directory-card,.discover-directory-card>span,.discover-city-search,
  .portal-consent,.portal-consultants a,.publication-description>p,.upload-preview button,.listing-documents,.draft-recovery,.listing-image-manager
){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-line)}
html.portal-dark :is(.listing-card,.category-card,.discover-company-card,.discover-directory-card,.account-dashboard-cards>a,.account-dashboard-cards>button,.account-conversation,.discover-place-results button){border-color:var(--theme-control-border)}
html.portal-dark :is(.listing-card:hover,.category-card:hover,.category-card.selected,.discover-company-card:hover,.discover-directory-card:hover,.discover-place-results button:hover,.account-dashboard-cards>a:hover,.account-dashboard-cards>button:hover,.account-conversation:hover,.editorial-variables button:hover,.admin-quicklinks button:hover){background:var(--theme-raised);border-color:var(--theme-focus)}
html.portal-dark :is(.account-section-heading>span,.account-empty-mark,.account-message-avatar,.account-listing-placeholder,.account-listing-photo,.discover-empty-mark,.home-monogram,.seller-avatar,.card-image-link,.detail-photo){background:var(--theme-raised);color:var(--theme-muted)}
html.portal-dark :is(
  .account-recovery-codes,#account-provider-config fieldset,.comm-section,.community-plus fieldset,.company-accounts fieldset,.company-account-hours-editor>div,.company-account-hours>div,
  .control-table-wrap,.control-scopes,.control-recipient-list,.control-table th,.control-table td,.editorial-blocks,.editorial-backup-section,.editorial-import-summary,
  .engagement-company-picker,.engagement-company-picker label,.home-faq details,.custom-field-values div,.custom-fields,.guest-form fieldset,.guest-messages article,
  .ad-report-table th,.ad-report-table td,.management-section,.management-moderation,.management-table td,.management-table th,.management-details,.admin-toolbar,.import-confirm,
  .operation-user-action,.operation-company-data,.operation-company-decision,.partner-contract,.provider-correction,.publication-details,.publication-history,.publication-decision,
  .recovery-plan,.taxonomy-tree,.taxonomy-item,.account-listing-metrics,.account-newsletter,.account-dashboard-metrics,.account-dashboard-links,.account-dashboard-links>a,.account-dashboard-links>button,
  .auth-tabs,.auth-legacy,.account-password-actions,.discover-nav,.discover-pagination,.discover-company-hero,.discover-offers>a,.discover-reviews,.discover-review,.discover-article-next,
  .discover-faq,.discover-faq details,.discover-radio-group label,.discover-price-grid>article,.discover-price-terms,.discover-city-grid>a,.discover-directory-heading,.discover-region-grid>a
){border-color:var(--theme-line)}
html.portal-dark :is(.management-table th,.control-table th){background:var(--theme-raised);color:var(--theme-muted)}
html.portal-dark :is(.editorial-backup-section input[type=file],.import-file input){background:var(--theme-surface);border-color:var(--theme-control-border);color:var(--theme-text)}
html.portal-dark :is(.import-instructions code,.account-recovery-codes li,.account-totp-secret){background:var(--theme-raised);color:var(--theme-text)}
html.portal-dark .portal-contact-widget{color:var(--theme-text)}

/* Active navigation and selection are explicit rather than relying on ink text. */
html.portal-dark :is(.admin-nav button,.admin-nav-group button,.account-nav button,.account-nav .account-company-link,.management-tabs button,.discover-nav a,.region-list button,.editorial-variables button){color:var(--theme-muted);border-color:var(--theme-control-border)}
html.portal-dark :is(.admin-nav button,.admin-nav-group button,.account-nav button,.account-nav .account-company-link){background:transparent}
html.portal-dark :is(.admin-nav button:hover,.admin-nav-group button:hover,.account-nav button:hover,.account-nav .account-company-link:hover,.discover-nav a:hover,.region-list button:hover){background:var(--theme-raised);color:var(--theme-text)}
html.portal-dark :is(.admin-nav button[aria-current=page],.admin-nav-group button[aria-current=page],.account-nav button[aria-current=page],.account-nav .account-company-link[aria-current=page],.management-tabs button[aria-current=page],.discover-nav a[aria-current=page]){background:var(--theme-raised);color:var(--theme-text);border-color:var(--theme-focus);box-shadow:inset 3px 0 var(--theme-accent)}
html.portal-dark .management-tabs button{background:var(--theme-surface);color:var(--theme-muted);border-color:var(--theme-control-border)}
html.portal-dark .management-tabs button:hover{background:var(--theme-raised);color:var(--theme-text);border-color:var(--theme-focus)}
html.portal-dark .management-tabs button[aria-current=page]{background:var(--theme-raised);color:var(--theme-text);border-color:var(--theme-focus);box-shadow:inset 3px 0 var(--theme-accent)}
html.portal-dark .management-tabs button:focus-visible{outline:3px solid var(--theme-focus);outline-offset:3px}
html.portal-dark :is(.account-status-tabs button[aria-pressed=true],.auth-tabs a[aria-current=page]){color:var(--theme-text);border-color:var(--theme-accent)}
html.portal-dark .account-status-tabs button[aria-pressed=true]:after{background:var(--theme-accent)}
html.portal-dark :is(.region-list button.selected,.place-option[aria-selected=true],.place-option:hover,.discover-radio-group label:has(input:checked),.discover-price-grid>.discover-price-featured){background:var(--theme-raised);color:var(--theme-text);border-color:var(--theme-focus)}
html.portal-dark :is(.view-switch,.account-status-tabs button span){background:var(--theme-panel)}
html.portal-dark :is(.view-switch button,.mode-tabs button){color:var(--theme-muted)}
html.portal-dark :is(.view-switch .selected,.mode-tabs .selected){background:var(--theme-raised);color:var(--theme-text)}
html.portal-dark .discover-app-mark{background:var(--theme-raised);color:var(--theme-text);border:1px solid var(--theme-control-border)}

/* Semantic badges and messages use their own dark backgrounds. */
html.portal-dark :is(.tag,.counter,.management-badge,.discover-count,.discover-tags span,.card-category>span:last-child){background:var(--theme-raised);color:var(--theme-text);border-color:var(--theme-control-border)}
html.portal-dark :is(.tag-featured,.account-status-draft,.discover-status,.notice,.account-error,.account-moderation-notice,.discover-promotion-note,.finance-warning,.backend-status){background:var(--theme-warning-bg);color:var(--theme-warning);border-color:var(--theme-warning)}
html.portal-dark :is(.account-moderation-notice p,.discover-promotion-note p){color:var(--theme-warning)}
html.portal-dark :is(.account-status,.tag-rent,.discover-form-success,.finance-code-result,.backend-ready-tag){background:var(--theme-success-bg);color:var(--theme-success);border-color:var(--theme-success)}
html.portal-dark .account-status-draft{background:var(--theme-warning-bg);color:var(--theme-warning)}
html.portal-dark .account-status-archived{background:var(--theme-raised);color:var(--theme-muted)}
html.portal-dark span.tag.tag-featured{background:var(--theme-warning-bg);color:var(--theme-warning);border-color:var(--theme-warning)}
html.portal-dark span.tag.tag-rent{background:var(--theme-success-bg);color:var(--theme-success);border-color:var(--theme-success)}
html.portal-dark :is(.discover-error,.admin-main>#admin-error){background:var(--theme-danger-bg);color:var(--theme-danger);border-color:var(--theme-danger)}
html.portal-dark :is(.error-text,.filter-bottom>p,.danger-button,.account-text-danger,.guest-images button,.photo-upload-error,.account-listing-actions button.danger-button,.account-listing-actions button.account-text-danger,.account-listing-actions a.account-text-danger){color:var(--theme-danger)}
html.portal-dark :is(.account-success,.comm-form [data-comm-status]){color:var(--theme-success)}
html.portal-dark :is(.account-dashboard-details .account-dashboard-hold,.my-listing-warning){color:var(--theme-warning)}
html.portal-dark .account-dashboard-details p.account-dashboard-hold{color:var(--theme-warning)}
html.portal-dark .account-listing p.my-listing-warning{color:var(--theme-warning)}
html.portal-dark :is(.account-conversation.has-unread,.account-message.is-mine){background:var(--theme-raised);border-color:var(--theme-accent)}
html.portal-dark .account-message-date b{background:var(--portal-cta-background,var(--portal-cta-default));color:#fff}
html.portal-dark .account-avatar{background:#4b3520;color:var(--theme-accent)}
html.portal-dark :is(.discover-review>div>span,.downloads-format,.photo-label-icon){background:#4b3520;color:var(--theme-accent)}
html.portal-dark .engagement-stars{color:var(--theme-warning)}

/* Brand accents used as text are lighter than the CTA fill. */
html.portal-dark :is(
  .eyebrow,.orange-dot,.brand-dot,h1>span,.detail-company-link,.account-listing-actions .account-edit-link,.account-listing-actions>.account-promote-link,
  .auth-check a,.auth-help,.auth-switch a,.auth-legacy a,.management-heading .management-eyebrow,.management-text-link,.management-list .management-rating,
  .management-details summary,.admin-listing-preview,.admin-breadcrumb button,.discover-eyebrow,.discover-external,.discover-consent a,.discover-read-more,
  .discover-app-mark>span,.discover-app-steps>article>span,.publication-website,.publication-description summary,.location-change-button,.place-option[aria-selected=true]>.icon
){color:var(--theme-accent)}
html.portal-dark :is(.nav-action:hover,.text-link:hover,.footer-links button:hover,.footer-links a:hover,.browse-nav a:hover,.portal-quick-links a:hover,.discover-offers>a:hover strong,.discover-editorial-card h4 a:hover,.discover-city-grid>a:hover strong,.discover-region-grid>a:hover,.discover-card-arrow:hover,.account-dashboard-links>a:hover,.account-dashboard-links>button:hover){color:var(--theme-accent)}
html.portal-dark .eyebrow>span:empty{background:var(--theme-accent)}
html.portal-dark .discover-faq details[open] summary>span{color:var(--theme-accent)}
html.portal-dark :is(.management-heading p.management-eyebrow,.management-list p.management-rating,.account-listing-actions a.account-edit-link,.account-listing-actions a.account-promote-link){color:var(--theme-accent)}
html.portal-dark .auth-password button{color:var(--theme-text)}
html.portal-dark .auth-intro{background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-line)}
html.portal-dark .auth-intro :is(p,small){color:var(--theme-muted)}
html.portal-dark .media-player{background:var(--theme-page)}

/* The map keeps colored regions, readable labels and visible keyboard focus. */
html.portal-dark :is(.poland-map-panel,.location-footer){background:var(--theme-panel);color:var(--theme-text);border-color:var(--theme-line)}
html.portal-dark .poland-map path{fill:var(--theme-raised);stroke:var(--theme-control-border)}
html.portal-dark .poland-map text{fill:var(--theme-text)}
html.portal-dark :is(.poland-map path.selected,.poland-map path:hover){fill:#913c20;stroke:var(--theme-focus)}
html.portal-dark .poland-map path:focus-visible{fill:#913c20;stroke:var(--theme-focus);outline:2px solid var(--theme-focus);outline-offset:2px}
html.portal-dark .poland-map g:has(path.selected) text{fill:#fff}
html.portal-dark .place-option{border-color:var(--theme-line)}

/* Overlays and image badges retain an opaque surface rather than gray-on-photo. */
html.portal-dark .photo-label{background:#242424f5;color:var(--theme-text);border-color:var(--theme-control-border)}
html.portal-dark .visual-note{background:#181818e8;color:#fff}
html.portal-dark .favorite-button{background:var(--theme-panel);color:var(--theme-text);border-color:var(--theme-control-border)}
html.portal-dark :is(.favorite-button:hover,.favorite-button[aria-pressed=true]){background:var(--theme-raised);color:var(--theme-accent)}
html.portal-dark .favorite-button[aria-pressed=true] .icon{fill:#6a341f}
html.portal-dark .detail-thumbnails button.selected{border-color:var(--theme-focus)}
html.portal-dark .portal-language-flag[aria-current=true]{border-color:var(--theme-control-border)}
html.portal-dark .portal-language-flag:hover{background:var(--theme-raised)}
html.portal-dark .portal-theme-switch{border-color:var(--theme-control-border)}
html.portal-dark .control-adblock-notice{background:var(--theme-surface);color:var(--theme-muted);border-color:var(--theme-line)}

/* Listing package: file rows, recovery states and image controls use the same palette. */
html.portal-dark :is(.listing-document-list li,.listing-image-item,.recent-listings-empty){background:var(--theme-panel);color:var(--theme-text);border-color:var(--theme-line)}
html.portal-dark :is(.listing-document-list small,.recent-listings-empty p,.draft-save-state){color:var(--theme-muted)}
html.portal-dark .listing-documents input[type=file]{border-color:var(--theme-control-border)}
html.portal-dark input[type=file]:disabled::file-selector-button{background:var(--theme-panel);color:var(--theme-muted);border-color:var(--theme-line);border-style:dashed;cursor:not-allowed}
html.portal-dark .listing-image-item figcaption strong{color:var(--theme-accent)}
html.portal-dark .listing-image-item:has(figcaption strong){border-color:var(--theme-accent);box-shadow:inset 0 3px var(--theme-accent)}
html.portal-dark :is(.listing-image-actions .icon-button,.detail-gallery-controls .icon-button){background:var(--theme-surface);color:var(--theme-text);border-color:var(--theme-control-border)}
html.portal-dark :is(.listing-image-actions .icon-button,.detail-gallery-controls .icon-button):hover{background:var(--theme-raised);color:var(--theme-text);border-color:var(--theme-focus)}
html.portal-dark .listing-image-actions [data-remove-photo]:hover{background:var(--theme-danger-bg);color:var(--theme-danger);border-color:var(--theme-danger)}
html.portal-dark :is(.listing-image-actions,.detail-gallery-controls,.card-image-controls) button:disabled,
html.portal-dark :is(.listing-image-actions,.detail-gallery-controls,.card-image-controls) button:disabled:hover{opacity:1;background:var(--theme-panel);color:var(--theme-muted);border-color:var(--theme-line);border-style:dashed;cursor:not-allowed}
html.portal-dark .draft-recovery{background:var(--theme-warning-bg);color:var(--theme-text);border-color:var(--theme-warning)}
html.portal-dark .draft-save-state[data-error=true]{color:var(--theme-danger)}
html.portal-dark .recent-listings-empty{border-color:var(--theme-control-border)}
html.portal-dark .recent-header-link{color:var(--theme-text)}
html.portal-dark .recent-header-link:hover{color:var(--theme-accent)}

/* Opaque photo overlays guarantee contrast independently of the uploaded image. */
html.portal-dark :is(.card-image-count,.card-image-controls button){background:var(--theme-panel);color:var(--theme-text);border:1px solid var(--theme-control-border)}
html.portal-dark .card-image-controls button:hover{background:var(--theme-raised);color:var(--theme-text);border-color:var(--theme-focus)}
html.portal-dark .card-image-controls button:active{background:var(--theme-surface);color:var(--theme-accent)}
html.portal-dark :is(.card-image-controls button,.detail-gallery-controls button,.listing-image-actions button,.detail-gallery):focus-visible{outline:3px solid var(--theme-focus);outline-offset:3px}
html.portal-dark .card-image-controls button:focus-visible{box-shadow:0 0 0 6px var(--theme-panel)}
html.portal-dark .detail-gallery-controls span{color:var(--theme-muted)}
html.portal-dark .detail-thumbnails{padding:7px 6px 10px}
html.portal-dark .detail-thumbnails button{background:var(--theme-panel);border-color:var(--theme-control-border)}
html.portal-dark .detail-thumbnails button:hover{border-color:var(--theme-accent)}
html.portal-dark :is(.detail-thumbnails button.selected,.detail-thumbnails button[aria-pressed=true]){border-color:var(--theme-focus);box-shadow:0 0 0 2px var(--theme-panel),0 0 0 4px var(--theme-focus)}
html.portal-dark .detail-thumbnails button:focus-visible{outline:3px solid var(--theme-focus);outline-offset:3px}

/* Printable billing documents intentionally keep paper colors, including their children. */
html.portal-dark .finance-print{background:#fff;color:#172f40;color-scheme:light;border-color:#526570}
html.portal-dark .finance-print.finance-print :is(h1,h2,h3,h4,h5,h6,p,small,span,strong,dt,dd,th,td,a){color:#172f40}
html.portal-dark .finance-print .finance-warning{background:#fff6e6;color:#725318;border-color:#725318}
@media print{
  html.portal-dark .finance-print,html.portal-dark .finance-print .finance-warning{background:#fff;color:#000}
  html.portal-dark .finance-print.finance-print :is(h1,h2,h3,h4,h5,h6,p,small,span,strong,dt,dd,th,td,a){color:#000}
}

@media(prefers-reduced-motion:reduce){
  html.portal-dark :is(.listing-card,.category-card,.discover-company-card,.discover-directory-card,.account-dashboard-cards>a,.account-dashboard-cards>button){transition:none;transform:none}
}
