/* The shared public layouts load this file last. Admin pages do not load it. */
.home-header__theme-toggle {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  border: 1px solid rgba(23, 25, 29, .16);
  border-radius: 50%;
  background: #fff;
  color: var(--site-header-ink);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.home-header__theme-toggle:hover {
  border-color: var(--site-header-cyan);
  color: var(--site-header-pink);
  transform: translateY(-2px);
}

.home-header__theme-toggle:focus-visible {
  outline: 3px solid var(--site-header-cyan);
  outline-offset: 3px;
}

.home-header--compact .home-header__theme-toggle {
  width: 2.45rem;
  height: 2.45rem;
}

@media (max-width: 575.98px) {
  .home-header__right { gap: .45rem; }
  .home-header__theme-toggle { width: 2.5rem; height: 2.5rem; }
  .home-header--compact .home-header__theme-toggle { width: 2.25rem; height: 2.25rem; }
}

:root[data-site-theme="dark"] {
  color-scheme: dark;
  --background-color: #0d1119;
  --default-color: #e7edf4;
  --heading-color: #f5f7fb;
  --surface-color: #171e2a;
  --nav-color: #e7edf4;
  --nav-mobile-background-color: #171e2a;
  --nav-dropdown-background-color: #171e2a;
  --nav-dropdown-color: #e7edf4;
  --nm-bg: #0d1119;
  --nm-paper: #171e2a;
  --nm-ink: #f4f7fb;
  --nm-muted: #aab7c7;
  --nm-line: rgba(214, 228, 241, .16);
  --nm-cyan-soft: #123745;
  --nm-pink-soft: #382039;
  --nm-dark: #090d14;
  --site-header-ink: #eef3fa;
}

:root[data-site-theme="dark"] body,
:root[data-site-theme="dark"] .main,
:root[data-site-theme="dark"] .new-main {
  background-color: #0d1119;
  color: #e7edf4;
}

:root[data-site-theme="dark"] .light-background {
  --background-color: #111823;
  --surface-color: #1a2432;
  --default-color: #e7edf4;
  --heading-color: #f5f7fb;
}

:root[data-site-theme="dark"] .home-header,
:root[data-site-theme="dark"] .home-header.home-header--compact {
  border-bottom-color: rgba(109, 210, 232, .2);
  background: rgba(15, 21, 31, .95);
  box-shadow: 0 .85rem 2.5rem rgba(0, 0, 0, .24);
}

:root[data-site-theme="dark"] .home-header__brand span { color: #aab7c7; }

:root[data-site-theme="dark"] .site-preloader {
  --preloader-bg: #0d1119;
  --preloader-ink: #e7edf4;
  --preloader-accent: #e884bf;
}
:root[data-site-theme="dark"] .site-preloader__mark { width: clamp(11rem, 22vw, 16rem); }
:root[data-site-theme="dark"] .site-preloader__logo--light { display: none; }
:root[data-site-theme="dark"] .site-preloader__logo--dark { display: block; }
:root[data-site-theme="dark"] .site-preloader__bar {
  background: linear-gradient(90deg, #35b7d5, #e884bf);
}

:root[data-site-theme="dark"] .home-header__theme-toggle,
:root[data-site-theme="dark"] .home-header__burger {
  border-color: rgba(151, 205, 225, .27);
  background: #1a2634;
  color: #eaf6fc;
}

:root[data-site-theme="dark"] .home-header__theme-toggle:hover {
  border-color: #43bbd5;
  color: #f58cca;
}

:root[data-site-theme="dark"] .home-header__drawer {
  border-top-color: rgba(151, 205, 225, .2);
  background: rgba(19, 27, 39, .99);
  box-shadow: 0 1.5rem 2.8rem rgba(0, 0, 0, .35);
}

:root[data-site-theme="dark"] .home-header__drawer a {
  border-bottom-color: rgba(151, 205, 225, .16);
}

/* Shared content and controls */
:root[data-site-theme="dark"] :is(.site-page, .news-page, .articles-page, .contact-page, .casting-request-page) {
  color: #e7edf4;
}

:root[data-site-theme="dark"] :is(.card, .modal-content, .pagination .page-link, .dropdown-menu, .accordion-item, .form-control, .form-select, .input-group-text) {
  border-color: rgba(214, 228, 241, .18);
  background-color: #1b2532;
  color: #e7edf4;
}

:root[data-site-theme="dark"] :is(.form-control, .form-select, textarea, input)::placeholder { color: #9aaabc; }
:root[data-site-theme="dark"] :is(.text-muted, .card-text) { color: #aab7c7 !important; }
:root[data-site-theme="dark"] :is(.border, .border-top, .border-bottom) { border-color: rgba(214, 228, 241, .18) !important; }

:root[data-site-theme="dark"] .article-content .article-cta,
:root[data-site-theme="dark"] .news-feed-card,
:root[data-site-theme="dark"] .project-list-section .project-card,
:root[data-site-theme="dark"] .movie-info,
:root[data-site-theme="dark"] .movie-cast,
:root[data-site-theme="dark"] .casting-profile-extra,
:root[data-site-theme="dark"] .casting-text-grid > .casting-card,
:root[data-site-theme="dark"] .festival-feed-card,
:root[data-site-theme="dark"] .project-award-card,
:root[data-site-theme="dark"] #doctors .doctor-card,
:root[data-site-theme="dark"] .casting-request-page .modal-window {
  border-color: rgba(214, 228, 241, .14);
  background: #1a2432;
  color: #e7edf4;
}

:root[data-site-theme="dark"] .movie-page .movie-info,
:root[data-site-theme="dark"] .movie-page .movie-info strong {
  color: #fff;
}

:root[data-site-theme="dark"] .movie-page .btn-pink.btn-lg {
  border-color: #fff;
  background-color: #fff;
  color: #b31b6f;
}

:root[data-site-theme="dark"] .movie-page .btn-pink.btn-lg:hover,
:root[data-site-theme="dark"] .movie-page .btn-pink.btn-lg:focus-visible {
  border-color: #e9f4f8;
  background-color: #e9f4f8;
  color: #9b165f;
}

:root[data-site-theme="dark"] .casting-text-grid > .casting-card--skills,
:root[data-site-theme="dark"] .news-feed-card .news-swiper,
:root[data-site-theme="dark"] .festival-swiper,
:root[data-site-theme="dark"] .project-media-shell,
:root[data-site-theme="dark"] .casting-filters,
:root[data-site-theme="dark"] .casting-filter-toggle {
  background: #202c3b;
  color: #e7edf4;
}

:root[data-site-theme="dark"] .news-feed-media-shell--image,
:root[data-site-theme="dark"] .news-feed-image-placeholder,
:root[data-site-theme="dark"] .news-feed-media-frame:not(.news-feed-media-frame--video) {
  background: #263343;
}
:root[data-site-theme="dark"] .news-feed-meta,
:root[data-site-theme="dark"] .news-feed-telegram-link { color: #f096cd; }

:root[data-site-theme="dark"] #doctors .cast-title,
:root[data-site-theme="dark"] .casting-request-page .modal-close { color: #f4f7fb; }
:root[data-site-theme="dark"] .casting-request-page .file-input {
  background: #f8f2f7;
  color: #242b35;
}
:root[data-site-theme="dark"] .casting-request-page .file-text { color: #242b35; }

:root[data-site-theme="dark"] :is(.news-feed-content, .festival-feed-row dd, .content-tag-filter-label, .content-tag-filter-reset, .casting-filter-toggle, .casting-card__title, .casting-card .casting-text :is(h1,h2,h3,h4,h5,h6), .project-award-card__copy h4) {
  color: #eef3fa;
}

:root[data-site-theme="dark"] .brand-case-page { background: #101924; color: #e7edf4; }
:root[data-site-theme="dark"] .brand-case-main,
:root[data-site-theme="dark"] .brand-case-thumbs .swiper-slide { background: #1a2634; }
:root[data-site-theme="dark"] .brand-case-story,
:root[data-site-theme="dark"] .brand-case-kicker span { color: #d7e4ef; }

:root[data-site-theme="dark"] .projects-page {
  background: radial-gradient(circle at top left, rgba(242, 32, 146, .11), transparent 23rem),
              radial-gradient(circle at right 10%, rgba(6, 185, 212, .09), transparent 24rem), #0d1119;
}
:root[data-site-theme="dark"] .projects-page::after { background: rgba(201, 39, 141, .1); }
:root[data-site-theme="dark"] .projects-page :is(.projects-page__title, .projects-hero__name, .project-card__title, .project-card__link, .projects-advantage__item h3, .projects-cta h3) {
  color: #f4f7fb;
}
:root[data-site-theme="dark"] .projects-page :is(.projects-page__subtext, .projects-hero__meta, .projects-hero__description, .project-card__meta, .project-card__description, .projects-advantage__item p, .projects-cta p) {
  color: #b9c6d4;
}
:root[data-site-theme="dark"] .projects-page :is(.project-card, .projects-advantage, .projects-cta, .projects-empty) {
  border-color: rgba(214, 228, 241, .16);
  background: #1a2432;
  color: #d6e1ec;
}
:root[data-site-theme="dark"] .projects-page .projects-button:not(.projects-button--primary) {
  border-color: rgba(242, 32, 146, .45);
  background: #263343;
  color: #f096cd;
}
:root[data-site-theme="dark"] .projects-modal__header { background: #202c3b; }
:root[data-site-theme="dark"] .projects-modal__title { color: #f4f7fb; }

/* Home and landing pages */
:root[data-site-theme="dark"] .new-main-hero { background: #101722; }
:root[data-site-theme="dark"] .new-main-hero::before {
  background: linear-gradient(90deg, rgba(10, 15, 23, .96), rgba(10, 15, 23, .78) 48%, rgba(10, 15, 23, .14) 80%),
              linear-gradient(180deg, transparent 60%, #0d1119);
}
:root[data-site-theme="dark"] .new-main-hero .promo-hero__title-main,
:root[data-site-theme="dark"] .new-main-hero .promo-hero__age span,
:root[data-site-theme="dark"] .promo-hero__title,
:root[data-site-theme="dark"] .promo-hero__age,
:root[data-site-theme="dark"] .promo-hero__text { color: #f5f7fb; }
:root[data-site-theme="dark"] .new-main-hero .promo-header__note,
:root[data-site-theme="dark"] .promo-hero__cta-note { color: #c7d6e3; }

:root[data-site-theme="dark"] :is(.nm-intro-video, .nm-formats, .nm-production, .nm-stars-showcase, .nm-reviews, .nm-section-disclosure) {
  background: #171e2a;
}
:root[data-site-theme="dark"] :is(.nm-starts, .nm-projects, .nm-team, .nm-faq, .nm-case--standalone, .nm-role) {
  background: #111925;
}
:root[data-site-theme="dark"] :is(.nm-start-card, .nm-selection__aside, .nm-role blockquote, .nm-person, .nm-section-disclosure__button, .nm-review span) {
  background: #202c3b;
  color: #f4f7fb;
}
:root[data-site-theme="dark"] .nm-selection__aside img { filter: brightness(.62); }
:root[data-site-theme="dark"] .nm-selection__aside p { color: #d0dbe7; }
:root[data-site-theme="dark"] .nm-button--outline:hover { background: #f4f7fb; color: #111925; }
:root[data-site-theme="dark"] .nm-journey-stage__number { color: #111925; }
:root[data-site-theme="dark"] .nm-lightbox button { background: #202c3b; color: #f4f7fb; }
:root[data-site-theme="dark"] .nm-role__media-copy h2,
:root[data-site-theme="dark"] .nm-role__media-copy p,
:root[data-site-theme="dark"] .nm-guarantees .nm-heading h2,
:root[data-site-theme="dark"] .nm-guarantees__note { color: #17191d; }
:root[data-site-theme="dark"] .request-step-next { background: #263c4c; color: #f4f7fb; }
:root[data-site-theme="dark"] .request-steps button {
  border-color: rgba(214, 228, 241, .22);
  color: #b8c6d4;
}
:root[data-site-theme="dark"] .nm-format--cyan { background: linear-gradient(145deg, #123745, #1b3746); }
:root[data-site-theme="dark"] .nm-format--pink { background: linear-gradient(145deg, #382039, #30283f); }
:root[data-site-theme="dark"] .nm-section-disclosure__summary,
:root[data-site-theme="dark"] .nm-section-disclosure__content { color: #e7edf4; }
:root[data-site-theme="dark"] .nm-star-card__portrait { background: #263341; }

:root[data-site-theme="dark"] .promo-journey { background: linear-gradient(180deg, #101925, #151f2d); }
:root[data-site-theme="dark"] .section-shell--light {
  background: radial-gradient(circle at top center, rgba(21, 159, 189, .1), transparent 20%), #111925;
  color: #e7edf4;
}
:root[data-site-theme="dark"] .promo-journey__heading,
:root[data-site-theme="dark"] .promo-selection__heading,
:root[data-site-theme="dark"] .promo-selection__role p { color: #eef3fa; }
:root[data-site-theme="dark"] .promo-process-card,
:root[data-site-theme="dark"] .promo-proof-card,
:root[data-site-theme="dark"] .promo-journey__nav { background: #202c3b; color: #e7edf4; }
:root[data-site-theme="dark"] .promo-section-kicker--dark { color: #f0bf6a; }
:root[data-site-theme="dark"] .promo-benefit p,
:root[data-site-theme="dark"] .promo-process-card p,
:root[data-site-theme="dark"] .promo-proof-card__meta span,
:root[data-site-theme="dark"] .promo-proof-card__body p { color: #c1cdda; }
:root[data-site-theme="dark"] .promo-selection__term p {
  background: linear-gradient(#202c3b, #202c3b) padding-box, linear-gradient(95deg, #0b9fbd, #b31b6f) border-box;
  color: #d5e3ef;
}
:root[data-site-theme="dark"] .promo-selection__text,
:root[data-site-theme="dark"] .promo-selection__status,
:root[data-site-theme="dark"] .promo-selection__term > span:not(.promo-selection__status),
:root[data-site-theme="dark"] .promo-selection__role span,
:root[data-site-theme="dark"] .promo-hero__video { color: #c9d5e1; }

:root[data-site-theme="dark"] .director-request,
:root[data-site-theme="dark"] .nm-request .director-request {
  background: radial-gradient(circle at 95% 8%, rgba(205, 50, 157, .14), transparent 26rem),
              radial-gradient(circle at 3% 82%, rgba(16, 166, 198, .12), transparent 27rem), #111925;
  color: #e7edf4;
}
:root[data-site-theme="dark"] .request-field__control {
  border-bottom-color: rgba(214, 228, 241, .3);
  color: #f4f7fb;
}
:root[data-site-theme="dark"] .request-field__control::placeholder { color: #9cabbc; }
:root[data-site-theme="dark"] .request-options,
:root[data-site-theme="dark"] .request-consents { border-left-color: rgba(214, 228, 241, .25); }
:root[data-site-theme="dark"] .director-request__media { background: #202c3b; }
:root[data-site-theme="dark"] .director-request__callout { background: #202c3b; color: #f4f7fb; }
:root[data-site-theme="dark"] .request-consent__link { color: #da95d9; }

/* Page-specific light panels */
:root[data-site-theme="dark"] .privacy-page {
  --privacy-ink: #f0f4f9;
  --privacy-muted: #aab7c7;
  --privacy-line: rgba(214, 228, 241, .17);
  background: #0d1119;
}
:root[data-site-theme="dark"] .privacy-hero {
  background: radial-gradient(circle at 86% 10%, rgba(223, 8, 126, .15), transparent 24rem),
              radial-gradient(circle at 8% 92%, rgba(22, 166, 198, .15), transparent 25rem), #151d29;
}
:root[data-site-theme="dark"] .privacy-document :is(p, li) { color: #c5d0dd; }
:root[data-site-theme="dark"] .privacy-operator { border-top-color: var(--privacy-line); }
:root[data-site-theme="dark"] .privacy-document p a { color: #ee91c7; }
:root[data-site-theme="dark"] .privacy-kicker { color: #f58cca; }

:root[data-site-theme="dark"] .actor-case-card,
:root[data-site-theme="dark"] .project-review-card,
:root[data-site-theme="dark"] .brand-cases-index__empty {
  border-color: rgba(214, 228, 241, .16);
  background: #1a2432;
  color: #eef3fa;
}
:root[data-site-theme="dark"] .actor-case-card__progress { background: #253343; }
:root[data-site-theme="dark"] .actor-case-card__summary,
:root[data-site-theme="dark"] .actor-case-card__progress span { color: #acbac9; }
:root[data-site-theme="dark"] .brand-cases-index__heading h1 { color: #f4f7fb; }
:root[data-site-theme="dark"] .brand-cases-index {
  background: radial-gradient(circle at 90% 8%, rgba(201, 39, 141, .12), transparent 28rem),
              radial-gradient(circle at 5% 65%, rgba(21, 159, 189, .12), transparent 30rem), #111925;
}
:root[data-site-theme="dark"] .brand-cases-index__heading p { color: #aab7c7; }
:root[data-site-theme="dark"] .actor-case-card__portfolio-link { color: #e1eaf2; }
:root[data-site-theme="dark"] .actor-case-card__primary-link { color: #f096cd; }
:root[data-site-theme="dark"] .actor-case-card__footer { border-top-color: rgba(214, 228, 241, .16); }
:root[data-site-theme="dark"] .project-review-card__author h3 { color: #f4f7fb; }
:root[data-site-theme="dark"] .project-review-card__text,
:root[data-site-theme="dark"] .project-review-card__actor span { color: #c1cdda; }
:root[data-site-theme="dark"] .project-review-card__author a,
:root[data-site-theme="dark"] .project-review-card__actor a { color: #f096cd; }

:root[data-site-theme="dark"] .actor-instagram-link,
:root[data-site-theme="dark"] .actor-instagram-link:hover,
:root[data-site-theme="dark"] .actor-instagram-link .actor-action-text strong { color: #fff; }
:root[data-site-theme="dark"] .casting-profile-extra .casting-card .casting-text,
:root[data-site-theme="dark"] .casting-profile-extra .casting-card .casting-text :is(p, li, strong, b, h1, h2, h3, h4, h5, h6, a),
:root[data-site-theme="dark"] .panda-portfolio-projects__heading .casting-subtitle,
:root[data-site-theme="dark"] .panda-portfolio-projects__copy h3,
:root[data-site-theme="dark"] .panda-portfolio-projects__copy > span:not(.panda-portfolio-projects__awards) { color: #fff; }

@media (max-width: 991.98px) {
  :root[data-site-theme="dark"] .new-main-hero::before {
    background: linear-gradient(90deg, rgba(10, 15, 23, .94), rgba(10, 15, 23, .62) 62%, rgba(10, 15, 23, .2));
  }
}

@media (max-width: 767.98px) {
  :root[data-site-theme="dark"] .new-main-hero::before {
    background: linear-gradient(180deg, rgba(10, 15, 23, .75), rgba(10, 15, 23, .38) 48%, rgba(10, 15, 23, .85)),
                linear-gradient(90deg, rgba(10, 15, 23, .3), transparent);
  }
  :root[data-site-theme="dark"] .new-main-hero .promo-hero__title::before {
    background: radial-gradient(ellipse at center, rgba(10, 15, 23, .72), rgba(10, 15, 23, .25) 56%, transparent 78%);
  }
  :root[data-site-theme="dark"] .new-main-hero .promo-hero__text,
  :root[data-site-theme="dark"] .promo-hero__bottom {
    border-color: rgba(214, 228, 241, .23);
    background: rgba(23, 30, 42, .82);
    color: #f4f7fb;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-header__theme-toggle { transition: none; }
}
